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

TypeError: unsupported operand type(s) for *: 'NoneType' and 'float' #112

Open
Lilja opened this issue Nov 20, 2020 · 0 comments
Open

TypeError: unsupported operand type(s) for *: 'NoneType' and 'float' #112

Lilja opened this issue Nov 20, 2020 · 0 comments

Comments

@Lilja
Copy link

Lilja commented Nov 20, 2020

>>> for share_uuid in api.share.shares_uuids:
...     print("Share name:        " + str(api.share.share_name(share_uuid)))
...     print("Share path:        " + str(api.share.share_path(share_uuid)))
...     print("Space used:        " + str(api.share.share_size(share_uuid, human_readable=True)))
...     print("Recycle Bin Enabled: " + str(api.share.share_recycle_bin(share_uuid)))
...     print("--")
...
Share name:        Audio
Share path:        /volume1
Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
  File "/root/.cache/pypoetry/virtualenvs/syex-9TtSrW0h-py3.7/lib/python3.7/site-packages/synology_dsm/api/core/share.py", line 68, in share_size
    share_size_bytes = SynoFormatHelper.megabytes_to_bytes(share_size_mb)
  File "/root/.cache/pypoetry/virtualenvs/syex-9TtSrW0h-py3.7/lib/python3.7/site-packages/synology_dsm/helpers.py", line 45, in megabytes_to_bytes
    var_bytes = num * 1024.0 * 1024.0
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'

version: python-synology-1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant