andrey-yantsen / plexiglas

Sync plex content across multiple servers
MIT License
21 stars 3 forks source link

module 'os' has no attribute 'statvfs' #8

Closed CtrlAltDefeat94 closed 5 years ago

CtrlAltDefeat94 commented 5 years ago

When trying to run Plexiglas on Windows I get the following traceback:

Traceback (most recent call last):
  File "c:\python37\lib\site-packages\plexiglas\cli.py", line 246, in main
    required_media = plugin.sync(plex, opts)
  File "c:\python37\lib\site-packages\plexiglas\mobile_sync.py", line 60, in sync
    if get_available_disk_space(opts.destination) < part.size:
  File "c:\python37\lib\site-packages\plexiglas\content.py", line 79, in get_available_disk_space
    fs_stat = os.statvfs(path)
AttributeError: module 'os' has no attribute 'statvfs'
Traceback (most recent call last):
  File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python37\Scripts\plexiglas.exe\__main__.py", line 9, in <module>
  File "c:\python37\lib\site-packages\plexiglas\cli.py", line 246, in main
    required_media = plugin.sync(plex, opts)
  File "c:\python37\lib\site-packages\plexiglas\mobile_sync.py", line 60, in sync
    if get_available_disk_space(opts.destination) < part.size:
  File "c:\python37\lib\site-packages\plexiglas\content.py", line 79, in get_available_disk_space
    fs_stat = os.statvfs(path)
AttributeError: module 'os' has no attribute 'statvfs'

After Googling for a bit, it seems that statvfs doesn't work on Windows specifically.

andrey-yantsen commented 5 years ago

Can you give a try with version 0.4.3? Should be available in pypi already.

CtrlAltDefeat94 commented 5 years ago

Just tested it and it's working. Thanks for the quick fix!

andrey-yantsen commented 5 years ago

Great, thanks for the interest :)