andhus / scantree

Flexible recursive directory iterator: `scandir` meets `glob("**", recursive=True)`
MIT License
13 stars 7 forks source link

ModuleNotFoundError: No module named 'posix' #4

Closed Coderx7 closed 2 months ago

Coderx7 commented 4 years ago

Hi, I'm having issues running dirhash in python3.7. upon trying to hash a directory, I get this error message:

Traceback (most recent call last):
  File "C:\Users\User\Anaconda3\Lib\site-packages\scantree\compat.py", line 20, in <module>
    from posix import DirEntry
ModuleNotFoundError: No module named 'posix'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "d:\Codes\ols\python\test_beds\testbed_stuff.py", line 12, in <module>
    from dirhash import dirhash
  File "C:\Users\User\Anaconda3\Lib\site-packages\dirhash\__init__.py", line 13, in <module>
    from scantree import (
  File "C:\Users\User\Anaconda3\Lib\site-packages\scantree\__init__.py", line 3, in <module>
    from ._path import (
  File "C:\Users\User\Anaconda3\Lib\site-packages\scantree\_path.py", line 7, in <module>
    from .compat import (
  File "C:\Users\User\Anaconda3\Lib\site-packages\scantree\compat.py", line 22, in <module>
    from scandir import scandir as _scandir
ModuleNotFoundError: No module named 'scandir'

Is this compatible with windows10? Whats the issue here?

racinmat commented 6 months ago

This happened to me too. While it worked on windows with version 0.0.1, the version 0.0.2 breaks. Would be great to remove the platform specific code or implement windows alternative.

frichtarik commented 5 months ago

i believe this PR #11 broke the functionality once #21 is merged, we'll fix it

andhus commented 2 months ago

Should be fixed by https://github.com/andhus/scantree/pull/22. Let me know if there are any issues!