Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception: (OS Error: Cross-device link, errno = 18) #314

Closed
jwilleke opened this issue Jun 1, 2024 · 3 comments
Closed

Unhandled exception: (OS Error: Cross-device link, errno = 18) #314

jwilleke opened this issue Jun 1, 2024 · 3 comments

Comments

@jwilleke
Copy link

jwilleke commented Jun 1, 2024

Crashed



Do you want your photos in one big chronological folder, or divided to folders by year/month?
[1] (default) - one big folder
[2] - year/month folders
(Type 1 or 2 or press enter for default):
2
Okay, will divide to folders!

What should be done with albums?
[0] shortcut: [Recommended] Album folders with shortcuts/symlinks to original photos. Recommended as it will take the least space, but may not be portable when moving across systems/computes/phones etc
[1] duplicate-copy: Album folders with photos copied into them. This will work across all systems, but may take wayyy more space!!
[2] json: Put ALL photos (including Archive and Trash) in one folder and make a .json file with info about albums. Use if you're a programmer, or just want to get everything, ignoring lack of year-folders etc.
[3] nothing: Just ignore them and put year-photos into one folder. WARNING: This ignores Archive/Trash !!!
3
Okay, doing: nothing

Okay, running... searching for everything in input folder...
Finding duplicates...
...
...
Finding albums (this may take some time, dont worry :) ...
Moving photos to output folder : ........................................ 0/51950  Unhandled exception:
FileSystemException: Cannot rename file to '/Volumes/hd3/google-photos-out/ALL_PHOTOS/1890/01/1575217472468-fc189425-88ba-4932-b97d-198aadadb(1).jpg', path = '/Volumes/hd4/tower-google-takeput/Photos from 1890/1575217472468-fc189425-88ba-4932-b97d-198aadadb(1).jpg' (OS Error: Cross-device link, errno = 18)
#0      _checkForErrorResponse (dart:io/common.dart:55)
#1      _File.rename.<anonymous closure> (dart:io/file_impl.dart:335)
<asynchronous suspension>
#2      moveFiles.moveFile (package:gpth/moving.dart:135)
<asynchronous suspension>
#3      moveFiles (package:gpth/moving.dart:140)
<asynchronous suspension>
#4      main.<anonymous closure> (file:///Users/runner/work/GooglePhotosTakeoutHelper/GooglePhotosTakeoutHelper/bin/gpth.dart:373)
<asynchronous suspension>

Let me know how I can help!

@TheriomGit
Copy link

I have a similar issue with Windows. The program crashes during the Finding albums step without progress. I found in the output folder an empty year folder that was created.

I first tried having monthly folders and symlinks created for albums. Then I tried to neglect the albums. All without success.

Its around 140Gb with 30K files.

@jwilleke
Copy link
Author

jwilleke commented Jun 3, 2024

I believe that due to the method used to "Rename" files, that this is because moving from one file system namespace to another.

os.rename only works if source and destination are on the same file system. You should use shutil.move instead.

Regardless, the application SHOULD catch these type of errors and perform some type of handler.

  • Proper Notification
  • Failed moves items list

@TheLastGimbus
Copy link
Owner

shutil.move

Wrong language buddy, this is Dart not python

duplicate of #251

@TheLastGimbus TheLastGimbus closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants