arsenetar / dupeguru

Find duplicate files
https://dupeguru.voltaicideas.net
GNU General Public License v3.0
5.28k stars 413 forks source link

cannot move found duplicates to another folder (AttributeError in source_base) #1090

Open isbjoernen opened 1 year ago

isbjoernen commented 1 year ago

I had found about 62 000 duplicates (photos) on an external USB disk on Kubuntu 22.04

When I had finishes reviewing the selected files I wanted to move them to another location, which failed with the following error:

Application Name: dupeGuru Version: 4.3.1 Python: 3.10.6 Operating System: Linux-5.15.0-58-generic-x86_64-with-glibc2.35

Traceback (most recent call last): File "/usr/share/dupeguru/hscommon/gui/progress_window.py", line 107, in pulse should_continue = self._error_func(self.jobid, err) File "/usr/share/dupeguru/core/app.py", line 332, in _job_error raise err File "/usr/share/dupeguru/hscommon/jobprogress/performer.py", line 46, in _async_run target(*args) File "/usr/share/dupeguru/core/app.py", line 465, in do self.results.perform_on_marked(op, not copy) File "/usr/share/dupeguru/core/results.py", line 302, in perform_on_marked func(dupe) File "/usr/share/dupeguru/core/app.py", line 462, in op self.copy_or_move(dupe, copy, destination, desttype) File "/usr/share/dupeguru/core/app.py", line 439, in copy_or_move source_base = source_base.relative_to(location_path.relative_to(location_path.anchor)) AttributeError: 'NoneType' object has no attribute 'relative_to'

All original files were located below: /home/art/usbDevices/WD5TbP2/home/Family-photos-and-videos

And I wanted to move the dupes to the existing yet empty folder /home/art/usbDevices/WD5TbP2/home/Family-photos-and-videos-dupes

/home/art/usbDevices is a softlink to /media/art/ so I tried again using the actual path as target: /media/art/WD5TbP2/home/Family-photos-and-videos-dupes with the same result

I made another attempt to move it to a different partition on the same physical usb disk: /media/art/WD5TbP1/family-fotos-dupes again producing the same error message.

I made a final attempt freeing space on my local hard disk attempting to move the dupes to that location: /home/art/family-fotos-dupes

And again the same error: Application Name: dupeGuru Version: 4.3.1 Python: 3.10.6 Operating System: Linux-5.15.0-58-generic-x86_64-with-glibc2.35

Traceback (most recent call last): File "/usr/share/dupeguru/hscommon/gui/progress_window.py", line 107, in pulse should_continue = self._error_func(self.jobid, err) File "/usr/share/dupeguru/core/app.py", line 332, in _job_error raise err File "/usr/share/dupeguru/hscommon/jobprogress/performer.py", line 46, in _async_run target(*args) File "/usr/share/dupeguru/core/app.py", line 465, in do self.results.perform_on_marked(op, not copy) File "/usr/share/dupeguru/core/results.py", line 302, in perform_on_marked func(dupe) File "/usr/share/dupeguru/core/app.py", line 462, in op self.copy_or_move(dupe, copy, destination, desttype) File "/usr/share/dupeguru/core/app.py", line 439, in copy_or_move source_base = source_base.relative_to(location_path.relative_to(location_path.anchor)) AttributeError: 'NoneType' object has no attribute 'relative_to'

To Reproduce:

Expected behavior

Environment: Kubuntu 22.04 uname -r : 5.15.0-58-generic python3 --version Python 3.10.6 KDE Plasma Version: 5.24.7 Frameworks: 5.92.0 Qt version: 5.15.3 Kernel: 5.15.0-58-generic Graphics: X11

glubsy commented 1 year ago

Thanks for reporting. Quick question: does the error message pop up right after clicking "OK" to move? Nothing gets moved at all then? (I suspect yes) Does it happen with only a coupe of marked files? (I suspect no) That's a lot of marked files... have you marked them all automatically, or was it a manual process? Was is the only operation you attempted or did you do any other operation beforehand?

isbjoernen commented 1 year ago

Hi, and thanks for looking into this..

Then I tried to move the marked files.....to no avail.

Thanks.

On Tue, 17 Jan 2023 at 22:49, Fuan @.***> wrote:

Thanks for reporting. Quick question: does the error message pop up right after clicking "OK" to move? Nothing gets moved at all then? (I suspect yes) Does it happen with only a coupe of marked files? (I suspect no) That's a lot of marked files... have you marked them all automatically, or was it a manual process?

— Reply to this email directly, view it on GitHub https://github.com/arsenetar/dupeguru/issues/1090#issuecomment-1386109584, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3S4T3A75XCPDL45UG5EPGLWS4HVXANCNFSM6AAAAAAT4H2PXM . You are receiving this because you authored the thread.Message ID: @.***>

isbjoernen commented 1 year ago

Hi,

To reply to your comment arsenetar@dupeguru:

Quick question: does the error message pop up right after clicking "OK" to move? Nothing gets moved at all then? (I suspect yes) Does it happen with only a coupe of marked files? (I suspect no) That's a lot of marked files... have you marked them all automatically, or was it a manual process?

Hi and thanks for looking into this..

Then I tried to move the marked files.....to no avail.

Thanks

isbjoernen commented 1 year ago

I tried with only 5 files marked (loading the saved results, then un-marking all, then marking 5 dupes) Action-> move files failed with the same error as reported originally. The number of marked files seems to make no difference.

I may try to install Anaconda with python 3.9... perhaps it will make a difference to 3.10 used at system level.....

isbjoernen commented 1 year ago

Hi,

I installed Anaconda 3.9 and built dupeguru release 4.3.1 from source within that older python environment and then loaded my saved dupeguru results and tried to move it as explained earlier. Well, I do get the same error.

Application Name: dupeGuru Version: 4.3.1 Python: 3.9.13 Operating System: Linux-5.15.0-58-generic-x86_64-with-glibc2.35

Traceback (most recent call last): File "/home/art/software/dupeGuru/src/dupeguru-4.3.1/hscommon/gui/progress_window.py", line 107, in pulse should_continue = self._error_func(self.jobid, err) File "/home/art/software/dupeGuru/src/dupeguru-4.3.1/core/app.py", line 332, in _job_error raise err File "/home/art/software/dupeGuru/src/dupeguru-4.3.1/hscommon/jobprogress/performer.py", line 46, in _async_run target(*args) File "/home/art/software/dupeGuru/src/dupeguru-4.3.1/core/app.py", line 465, in do self.results.perform_on_marked(op, not copy) File "/home/art/software/dupeGuru/src/dupeguru-4.3.1/core/results.py", line 302, in perform_on_marked func(dupe) File "/home/art/software/dupeGuru/src/dupeguru-4.3.1/core/app.py", line 462, in op self.copy_or_move(dupe, copy, destination, desttype) File "/home/art/software/dupeGuru/src/dupeguru-4.3.1/core/app.py", line 439, in copy_or_move source_base = source_base.relative_to(location_path.relative_to(location_path.anchor)) AttributeError: 'NoneType' object has no attribute 'relative_to'

Any ideas for a workaround or fix?! Many thanks

isbjoernen commented 1 year ago

workaround... I built version 4.2.1 from source inside Anaconda 3.9 and that moved the zillion files as expected! Hence my little task is completed. DupeGuru 4.3.1 found 62,000 dupes in a total of 307,000 photos and version 4.2.1 moved the marked dupes as expected. Thanks.