GooglePhotosTakeoutHelper
GooglePhotosTakeoutHelper copied to clipboard
Invalid Name crash, only while using experimental options.
I got this crash. It does not happen when I run the program omitting the --skip-extras-harder --skip-extras
options.
$ google-photos-takeout-helper -i Takeout -o processed --skip-extras-harder --skip-extras
Heeeere we go!
Counting how many input files we have ahead...
100%|███████████████████████████████████████████████████████████████████████████████████████████| 23/23 [00:05<00:00, 4.38formats/s]
Input files: 24289
=====================
Fixing files metadata and creation dates...
WHHoopssiee! Looks like script crashed! This shouldn't happen, although it often does haha :P
Most of the times, you should cut out the last printed file (it should be down there somehwere) to some other folder, and continue
If this doesn't help, and it keeps doing this after many cut-outs, you can check out issues tab:
https://github.com/TheLastGimbus/GooglePhotosTakeoutHelper/issues
to see if anyone has similar issue, or contact me other way:
https://github.com/TheLastGimbus/GooglePhotosTakeoutHelper/blob/master/README.md#contacterrors
Traceback (most recent call last):
> File "/home/j/.local/bin/google-photos-takeout-helper", line 8, in <module>
sys.exit(main())
│ │ └ <function main at 0x7fcf2d056dc0>
│ └ <built-in function exit>
└ <module 'sys' (built-in)>
File "/home/j/.local/lib/python3.8/site-packages/google_photos_takeout_helper/__main__.py", line 666, in main
for_all_files_recursive(
└ <function main.<locals>.for_all_files_recursive at 0x7fcf2c727430>
File "/home/j/.local/lib/python3.8/site-packages/google_photos_takeout_helper/__main__.py", line 151, in for_all_files_recursive
if filter_fun(file):
│ └ PosixPath('Takeout/Google Photos/Photos from 2020/IMG_20200811_131725(1).jpg')
└ <function main.<locals>.<lambda> at 0x7fcf2c72d700>
File "/home/j/.local/lib/python3.8/site-packages/google_photos_takeout_helper/__main__.py", line 670, in <lambda>
filter_fun=lambda f: (is_photo(f) or is_video(f))
│ │ │ │ └ PosixPath('Takeout/Google Photos/Photos from 2020/IMG_20200811_131725(1).jpg')
│ │ │ └ <function main.<locals>.is_video at 0x7fcf2c727550>
│ │ └ PosixPath('Takeout/Google Photos/Photos from 2020/IMG_20200811_131725(1).jpg')
│ └ <function main.<locals>.is_photo at 0x7fcf2c7274c0>
└ PosixPath('Takeout/Google Photos/Photos from 2020/IMG_20200811_131725(1).jpg')
File "/home/j/.local/lib/python3.8/site-packages/google_photos_takeout_helper/__main__.py", line 180, in is_photo
plain_file = file.with_name(_re.sub(search, '.', str(file)))
│ │ │ │ │ └ PosixPath('Takeout/Google Photos/Photos from 2020/IMG_20200811_131725(1).jpg')
│ │ │ │ └ '\\(\\d+\\)\\.'
│ │ │ └ <function sub at 0x7fcf2d156c10>
│ │ └ <module 're' from '/usr/lib/python3.8/re.py'>
│ └ <function PurePath.with_name at 0x7fcf2c7aeb80>
└ PosixPath('Takeout/Google Photos/Photos from 2020/IMG_20200811_131725(1).jpg')
File "/usr/lib/python3.8/pathlib.py", line 856, in with_name
raise ValueError("Invalid name %r" % (name))
└ 'Takeout/Google Photos/Photos from 2020/IMG_20200811_131725.jpg'
ValueError: Invalid name 'Takeout/Google Photos/Photos from 2020/IMG_20200811_131725.jpg'