Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

volumes = api.storage.volumes is None #3

Closed
oldfart101 opened this issue Sep 20, 2017 · 13 comments
Closed

volumes = api.storage.volumes is None #3

oldfart101 opened this issue Sep 20, 2017 · 13 comments
Labels
Hacktoberfest https://hacktoberfest.digitalocean.com/

Comments

@oldfart101
Copy link

Synology version DS3615xs
DSM version 5.2
volumes = api.storage.volumes returns a None result
and following .. TypeError: 'NoneType' object is not iterable

@bieniu
Copy link

bieniu commented Mar 6, 2018

I have the same error.
Synology DS110j (DSM 5.2)
When I run the sample script I have this:

Creating Valid API
=== Utilisation ===
DEBUG: Creating New Session
DEBUG: Requesting URL: 'http://192.168.2.10:5000/webapi/auth.cgi?api=SYNO.API.Auth&version=2&method=login&account=XXXXXX&passwd=XXXXXX&session=Core&format=cookie'
DEBUG: Request executed: 200
DEBUG: Succesfull returning data
DEBUG: {'data': {'sid': 'aDbwdecDn2o46B3G8N01761'}, 'success': True}
DEBUG: Authentication Succesfull, token: aDbwdecDn2o46B3G8N01761
DEBUG: Requesting URL: 'http://192.168.2.10:5000/webapi/entry.cgi?api=SYNO.Core.System.Utilization&version=1&method=get'
DEBUG: Appending access_token (SID: aDbwdecDn2o46B3G8N01761) to url
DEBUG: Request executed: 200
DEBUG: Succesfull returning data
DEBUG: {'data': {'cpu': {'15min_load': 90, '1min_load': 100, '5min_load': 98, 'device': 'System', 'other_load': 17, 'system_load': 12, 'user_load': 56}, 'disk': {'disk': [{'device': 'sda', 'display_name': 'Disk 1', 'read_access': 151, 'read_byte': 4903424, 'type': 'internal', 'utilization': 17, 'write_access': 0, 'write_byte': 7168}], 'total': {'device': 'total', 'read_access': 151, 'read_byte': 4903424, 'utilization': 17, 'write_access': 0, 'write_byte': 7168}}, 'memory': {'avail_real': 8276, 'avail_swap': 1954364, 'buffer': 3432, 'cached': 45488, 'device': 'Memory', 'memory_size': 131072, 'real_usage': 51, 'si_disk': 0, 'so_disk': 0, 'swap_usage': 6, 'total_real': 118464, 'total_swap': 2097144}, 'network': [{'device': 'total', 'rx': 1476, 'tx': 2478}, {'device': 'eth0', 'rx': 1476, 'tx': 2478}], 'space': {'lun': [], 'total': {'device': 'total', 'read_access': 1, 'read_byte': 57344, 'utilization': 0, 'write_access': 0, 'write_byte': 1024}, 'volume': [{'device': 'sda3', 'display_name': 'volume1', 'read_access': 1, 'read_byte': 57344, 'utilization': 0, 'write_access': 0, 'write_byte': 1024}]}, 'time': 1520370192}, 'success': True}
CPU Load:   85 %
Memory Use: 51 %
Net Up:     2.4Kb
Net Down:   1.4Kb
=== Storage ===
DEBUG: Requesting URL: 'http://192.168.2.10:5000/webapi/entry.cgi?api=SYNO.Storage.CGI.Storage&version=1&method=load_info'
DEBUG: Appending access_token (SID: aDbwdecDn2o46B3G8N01761) to url
DEBUG: Request executed: 200
DEBUG: Failed: {"error":{"code":102},"success":false}
DEBUG: Error occured, retrying...
DEBUG: Requesting URL: 'http://192.168.2.10:5000/webapi/entry.cgi?api=SYNO.Storage.CGI.Storage&version=1&method=load_info'
DEBUG: Appending access_token (SID: aDbwdecDn2o46B3G8N01761) to url
DEBUG: Request executed: 200
DEBUG: Failed: {"error":{"code":102},"success":false}
Traceback (most recent call last):
  File "/home/pi/syno.py", line 14, in <module>
    for volume in volumes:
TypeError: 'NoneType' object is not iterable

I tried several users (all from the administrators group), tried http and https and always the same error. I don't use the two-factor authentication.

@erykosky
Copy link

erykosky commented Mar 7, 2018

I've same error :(

Device: DS214+
Os: DSM 6.1.5-15254 Update 1

@waldirio
Copy link

waldirio commented Jun 28, 2018

Hello folks, good morning

I'm using DS213 and got the same issue on the original DSM version 5.2.

I was checking the code and then I decided upgrade the synology before working in the code. After reaching 6.0 the call api.storage.volumes started to work, then I fully upgraded DSM 6.2-23739 and everything is working as expected now.

Waldirio

@ProtoThis
Copy link
Owner

Sadly the 5.2 version of DSM is not supported due to the API being different. Might be added in the feature if someone is up for the job (don't have a 5.2 myself so am unable to create / test it)

@drewzh
Copy link

drewzh commented Oct 25, 2018

Now that we're 3 months on and this is happening with the latest version of DSM - 6.2, is there anything being done to investigate this?

@ProtoThis
Copy link
Owner

Hello drew,

Not sure what you mean. Only DSM version 6 and up is supported. Is something not working in DSM 6.2?

With kind regards,

Ferry

@drewzh
Copy link

drewzh commented Oct 26, 2018

Hi @StaticCube,

Yes, this appears to be manifesting itself on DSM 6.2. I'm using Home Assistant, which has a component: https://www.home-assistant.io/components/sensor.synologydsm/.

Whenever I try to use this component, it breaks on boot with the error highlighted in this issue.

I noticed further up, @erykosky is also highlighting that they're having the same issue on DSM 6.1 also?

@drewzh
Copy link

drewzh commented Oct 26, 2018

@ProtoThis
Copy link
Owner

@drewzh, didn't know it was doing that actually setting up my home assistance instance again (wrote that one 2). Will reopen the issue and fix it thanks.

@ProtoThis ProtoThis reopened this Oct 26, 2018
@drewzh
Copy link

drewzh commented Oct 30, 2018

Thanks @StaticCube, if you need any further output or testing, please let me know.

@alcar21
Copy link

alcar21 commented Nov 3, 2018

Hello,
The problem is https access. I have the same problem.
Regards.

@Quentame
Copy link
Collaborator

Hi !

Is the issue still happening with 0.4.0 ?
It includes #9, which I suppose fix this.

Thanks.

@Quentame
Copy link
Collaborator

Hi everyone !
Can you register here #26 to concentrate your setup and feature requests ?
Thanks.

PS: issue solved by #9, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest https://hacktoberfest.digitalocean.com/
Projects
None yet
Development

No branches or pull requests

8 participants