deplicate icon indicating copy to clipboard operation
deplicate copied to clipboard

duplicate.utils

Open moiseyo opened this issue 6 years ago • 6 comments

After installation python 3.8

import duplicate
duplicate.find('c:/mydev/python3')

run File "C:/MyDev/python3/temp/1.py", line 33, in import duplicate File "C:\Python36\lib\site-packages\duplicate_init_.py", line 13, in from .core import CACHE File "C:\Python36\lib\site-packages\duplicate\core.py", line 17, in from .structs import Cache, DupInfo, FileInfo, FilterType, SkipException File "C:\Python36\lib\site-packages\duplicate\structs.py", line 13, in from .utils.fs import blkdevice, blksize ModuleNotFoundError: No module named 'duplicate.utils'

moiseyo avatar Oct 26 '19 11:10 moiseyo

I can confirm this issue

ptrstn avatar Apr 11 '20 17:04 ptrstn

Same issue on Ubuntu 19.10:

Traceback (most recent call last):
  File "filemon/deplic.py", line 1, in <module>
    import duplicate
  File "/usr/local/lib/python3.7/dist-packages/duplicate/__init__.py", line 13, in <module>
    from .core import CACHE
  File "/usr/local/lib/python3.7/dist-packages/duplicate/core.py", line 17, in <module>
    from .structs import Cache, DupInfo, FileInfo, FilterType, SkipException
  File "/usr/local/lib/python3.7/dist-packages/duplicate/structs.py", line 13, in <module>
    from .utils.fs import blkdevice, blksize
ModuleNotFoundError: No module named 'duplicate.utils'

dev107 avatar May 18 '20 08:05 dev107

HI i saw earlier it said you fixed the issue am still running into it.

Traceback (most recent call last): File "c:\Users\M\Desktop\scripts\sorter\test.py", line 1, in from duplicate import find File "C:\Users\M\AppData\Local\Programs\Python\Python38-32\lib\site-packages\duplicate_init_.py", line 13, in from .core import CACHE File "C:\Users\M\AppData\Local\Programs\Python\Python38-32\lib\site-packages\duplicate\core.py", line 17, in from .structs import Cache, DupInfo, FileInfo, FilterType, SkipException File "C:\Users\M\AppData\Local\Programs\Python\Python38-32\lib\site-packages\duplicate\structs.py", line 13, in from .utils.fs import blkdevice, blksize ModuleNotFoundError: No module named 'duplicate.utils' PS C:\Users\M\Desktop\scripts\sorter>

haephestus avatar Jul 20 '20 21:07 haephestus

I tried to run my code and then this came up: Traceback (most recent call last): File "/Users/benbaessler/Documents/Projects/Cleaner/test.py", line 1, in import duplicate File "/Users/benbaessler/opt/anaconda3/lib/python3.7/site-packages/duplicate/init.py", line 13, in from .core import CACHE File "/Users/benbaessler/opt/anaconda3/lib/python3.7/site-packages/duplicate/core.py", line 17, in from .structs import Cache, DupInfo, FileInfo, FilterType, SkipException File "/Users/benbaessler/opt/anaconda3/lib/python3.7/site-packages/duplicate/structs.py", line 13, in from .utils.fs import blkdevice, blksize ModuleNotFoundError: No module named 'duplicate.utils'

ghost avatar Jul 21 '20 13:07 ghost

To fix the ModuleNotFoundError : download the source of the repository, extract the file. Put the utils folder in the site-packages/duplicate/

/usr/local/lib/python3.7/dist-packages/duplicate/utils C:\Users\M\AppData\Local\Programs\Python\Python38-32\lib\site-packages\duplicate\utils /Users/benbaessler/opt/anaconda3/lib/python3.7/site-packages/duplicate/utils/

jdlom avatar Oct 15 '20 14:10 jdlom

Need to fix this in the package itself and not rely on users doing this workaround please.

Furthermore why is the module called duplicate but the package called deplicate - let us just save time and confustion and use deplicate for both.

surfer190 avatar Aug 10 '21 10:08 surfer190