TheLastGimbus / GooglePhotosTakeoutHelper

Script that organizes the Google Takeout archive into one big chronological folder

Home Page:https://aur.archlinux.org/packages/gpth-bin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FileSystemException: Cannot set modification time

FlaynGordt opened this issue · comments

I am running in the following exception:

FileSystemException: Cannot set modification time, path = 'D:\Takeout3\ALL_PHOTOS\1972\07\22.1.jpg' (OS Error: The parameter is incorrect.
, errno = 87)
#0      _checkForErrorResponse (dart:io/common.dart:42)
#1      _File.setLastModified.<anonymous closure> (dart:io/file_impl.dart:445)
<asynchronous suspension>
#2      moveFiles (package:gpth/moving.dart:165)
<asynchronous suspension>
#3      main.<anonymous closure> (file:///d:/a/googlephotostakeouthelper/googlephotostakeouthelper/bin/gpth.dart:365)
<asynchronous suspension>

The file opens without problems but the info shows a weird date:
image

Are you using ExFAT on the D: drive?
I believe ExFAT still stores the file modification time as an MS-DOS value (16-bit based stuff) and therefore cannot store a date past year 2107.
So the picture you took from the TARDIS in year 4501 will not be able to have this date recorded on the filesystem.
One fix would be to fornat D: as NTFS. (Forcing you to copy your files somewhere else to not lose them).

Yes, I am using ExFAT, I dont have a drive that big available right now, so I cant just swap it with an NTFS drive.
I have collected a bunch of photos while time traveling and those photos are very old (and a bit broken). It would be awesome to just write a log message in a file ot to the console instead of crashing, so I can recover it manually later. Currently I am running the script again and again, fix the file where it crashes and start over.

Also, if the exception could show me the path of the source file and not the target file, it would be great :)
Thanks for the awesome script!

Hi! DId you manage to fix this manually? I may think of adding some try-catches for this, but i will need to think it through, so this doesn't backfire

Not sure that the problem is related to the tardis travels. I just successfully used the script on a Google Photos pull from my account, but when I tried using the script on a Google Photos pull from my wife's account I got what is almost the same error except that my photo has valid EXIF data from the past rather than the future and my hard drive is NTFS rather than ExFAT.

Moving photos to output folder : ........................................ 3/6053  Unhandled exception:
FileSystemException: Cannot set modification time, path = 'C:\Users\Christi\Downloads\GooglePhotos-Christi\Synology\ALL_PHOTOS\2012\11\IMG_0026_Original.JPG' (OS Error: The operation completed successfully.
, errno = 0)
#0      _checkForErrorResponse (dart:io/common.dart:42)
#1      _File.setLastModified.<anonymous closure> (dart:io/file_impl.dart:445)
<asynchronous suspension>
#2      moveFiles (package:gpth/moving.dart:165)
<asynchronous suspension>
#3      main.<anonymous closure> (file:///d:/a/googlephotostakeouthelper/googlephotostakeouthelper/bin/gpth.dart:365)
<asynchronous suspension>

image

Happy to provide copies of photos, JSON, or do other logging/debugging as you need.

As an update from last night, I checked the source folder and the file had in fact been copied over so I re-ran the script and told it to add files to the existing ones - the script processed the rest of the images without trouble. I also had a thought on one difference between my wife's photos and mine: I had mine go into one folder but had hers go into folders by date. @FlaynGordt also appears to be storing them by date - maybe there's a problem in the path structure there under certain conditions?

OS Error: The operation completed successfully., errno = 0)

ah i love windoza

to everyone in this thread: i will add some try-catches here, especcially with the "completed succeffuly" case -_-

Hi! DId you manage to fix this manually? I may think of adding some try-catches for this, but i will need to think it through, so this doesn't backfire

I gave up at some point and just used your tool on the photos from the last two years. That worked very nicely :)

Should be fixed in new release - try it out 👍