Skip to content

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

Description

@Lilja
>>> 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions