I was running the takeout helper for the first time and it crashed with the following stack trace:
File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
│ │ └ {'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': <zipimporter object "C:\Python39\Scripts\google-ph...
│ └ <code object <module> at 0x000002489C300710, file "C:\Python39\Scripts\google-photos-takeout-helper.exe\__main__.py", line 2>
└ <function _run_code at 0x000002489BFBC310>
File "c:\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
│ └ {'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': <zipimporter object "C:\Python39\Scripts\google-ph...
└ <code object <module> at 0x000002489C300710, file "C:\Python39\Scripts\google-photos-takeout-helper.exe\__main__.py", line 2>
> File "C:\Python39\Scripts\google-photos-takeout-helper.exe\__main__.py", line 7, in <module>
File "c:\python39\lib\site-packages\google_photos_takeout_helper\__main__.py", line 649, in main
for_all_files_recursive(
└ <function main.<locals>.for_all_files_recursive at 0x000002489E2AD9D0>
File "c:\python39\lib\site-packages\google_photos_takeout_helper\__main__.py", line 146, in for_all_files_recursive
file_function(file)
│ └ WindowsPath('C:/Takeout/Photos/Photos from 1969/PIC_20200503012445234_raw.jpg')
└ <function main.<locals>.<lambda> at 0x000002489E2B2EE0>
File "c:\python39\lib\site-packages\google_photos_takeout_helper\__main__.py", line 651, in <lambda>
file_function=lambda f: _walk_with_tqdm(fix_metadata(f), _metadata_bar),
│ │ │ │ └ <tqdm.std.tqdm object at 0x000002489E3309D0>
│ │ │ └ WindowsPath('C:/Takeout/Photos/Photos from 1969/PIC_20200503012445234_raw.jpg')
│ │ └ <function main.<locals>.fix_metadata at 0x000002489E2B25E0>
│ └ <function main.<locals>._walk_with_tqdm at 0x000002489E2B2820>
└ WindowsPath('C:/Takeout/Photos/Photos from 1969/PIC_20200503012445234_raw.jpg')
File "c:\python39\lib\site-packages\google_photos_takeout_helper\__main__.py", line 570, in fix_metadata
date = get_date_str_from_json(google_json)
│ └ {'title': 'PIC_20200503012445234_raw.jpg', 'description': '', 'imageViews': '0', 'creationTime': {'timestamp': '15884690...
└ <function main.<locals>.get_date_str_from_json at 0x000002489E2B23A0>
File "c:\python39\lib\site-packages\google_photos_takeout_helper\__main__.py", line 445, in get_date_str_from_json
return _datetime.fromtimestamp(
│ └ <method 'fromtimestamp' of 'datetime.datetime' objects>
└ <class 'datetime.datetime'>
OSError: [Errno 22] Invalid argument
{
"title": "PIC_20200301142213234_raw.jpg",
"description": "",
"imageViews": "0",
"creationTime": {
"timestamp": "1588469085",
"formatted": "3 May 2020, 01:24:45 UTC"
},
"photoTakenTime": {
"timestamp": "-21600",
"formatted": "31 Dec 1969, 18:00:00 UTC"
},
"geoData": {
"latitude": 0.0,
"longitude": 0.0,
"altitude": 0.0,
"latitudeSpan": 0.0,
"longitudeSpan": 0.0
},
"geoDataExif": {
"latitude": 0.0,
"longitude": 0.0,
"altitude": 0.0,
"latitudeSpan": 0.0,
"longitudeSpan": 0.0
},
"googlePhotosOrigin": {
"mobileUpload": {
"deviceFolder": {
"localFolderName": "Camera"
},
"deviceType": "ANDROID_TABLET"
}
}
}
Looking at the filename (20200301142213234) that's the same datetime as the creationTime.timestamp value but I'm not sure why as the former is when it was created on the phone and the former would have have been the date is was created on Google Drive when it was uploaded.
Thanks in advance for any help you can give.