TheLastGimbus / GooglePhotosTakeoutHelper

Script that organizes the Google Takeout archive into one big chronological folder
https://aur.archlinux.org/packages/gpth-bin
Apache License 2.0
3.88k stars 191 forks source link

Error while unzipping File PathNotFoundException #172

Closed shlomis1 closed 1 year ago

shlomis1 commented 1 year ago

On Windows, running the latest v3.3.2 After selecting all the .zips from Google Takeout, selecting an output folder, and choosing the default method getting the below error:

Error while unzipping File: 'F:\Downloads\takeout-20230207T165218Z-001.zip' :(
PathNotFoundException: Cannot create file, path = 'F:\New folder\.gpth-unzipped\Takeout/Google Photos/Design /metadata.json' (OS Error: The system cannot find the path specified.
, errno = 3)
[gpth quitted :( (code 69) - press enter to close]

Full output below:

GooglePhotosTakeoutHelper v3.3.2
Hi there! This tool will help you to get all of your photos from Google Takeout to one nice tidy folder

(If any part confuses you, read the guide on:
https://github.com/TheLastGimbus/GooglePhotosTakeoutHelper )

First, select all .zips from Google Takeout (use Ctrl to select multiple)
[press enter to continue]

Cool!

Now, select output folder - all photos will be extracted there
[press enter to continue]

Cool!

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):

Okay, one big it is!

(Note: everything will take ~218.47 GiB of disk space - you have 2.21 TiB free so should be fine :)
[press enter to continue]

gpth will now unzip all of that, process it and put everything in the output folder :)
[press enter to continue]

Unzipping takeout-20230207T165218Z-001.zip...
Error while unzipping File: 'F:\Downloads\takeout-20230207T165218Z-001.zip' :(
PathNotFoundException: Cannot create file, path = 'F:\New folder\.gpth-unzipped\Takeout/Google Photos/Design /metadata.json' (OS Error: The system cannot find the path specified.
, errno = 3)
[gpth quitted :( (code 69) - press enter to close]
TheLastGimbus commented 1 year ago

honestly dont have any good idea why :shrug: - maybe try on different disk?

shlomis1 commented 1 year ago

I think it has to do with the way the code handles trailing spaces, the file 'takeout-20230207T165218Z-001.zip' contains 3 folders:

  1. 'Design' <-- No spaces
  2. 'Design ' <-- Single trailing space character at the end
  3. 'Design(1)'

From the error, it seems to be failing on accessing the path with the 2nd folder: (i.e. 'Design ')

PathNotFoundException: Cannot create file, path = 'F:\New folder\.gpth-unzipped\Takeout/Google Photos/Design /metadata.json' (OS Error: The system cannot find the path specified.
, errno = 3)
tribulete commented 1 year ago

Hello. I have the same issue:

C:\temporal>.\gpth-windoza.exe
GooglePhotosTakeoutHelper v3.3.2
Hi there! This tool will help you to get all of your photos from Google Takeout to one nice tidy folder

(If any part confuses you, read the guide on:
https://github.com/TheLastGimbus/GooglePhotosTakeoutHelper )

First, select all .zips from Google Takeout (use Ctrl to select multiple)
[press enter to continue]

Cool!

Now, select output folder - all photos will be extracted there
[press enter to continue]

Cool!

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):
1
Okay, one big it is!

(Note: everything will take ~292.69 GiB of disk space - you have 689.12 GiB free so should be fine :)
[press enter to continue]

gpth will now unzip all of that, process it and put everything in the output folder :)
[press enter to continue]

Unzipping takeout-20230131T115153Z-001.zip...
Error while unzipping File: 'D:\takeout\takeout-20230131T115153Z-001.zip' :(
PathNotFoundException: Cannot create file, path = 'D:\takeout\out\.gpth-unzipped\Takeout/Google Photos/Viaje Colombia /metadata.json' (OS Error: El sistema no puede encontrar la ruta especificada.
, errno = 3)

[gpth quitted :( (code 69) - press enter to close]

In my case, the directory named "Viaje Colombia" not contain spaces in the zip file. The folder exists in the output folder created by the app, but , for some reason, the path that appears the error have a space.

TheLastGimbus commented 1 year ago

oh my god, i see it:

D:\takeout\out\.gpth-unzipped\Takeout/Google Photos/Viaje Colombia /metadata.json

D:\takeout\... ... /something/something

the archive guy didn't consider windoza :facepalm:

will try to contact them...

but i don't understand... does this mean windoza version wasn't working all of this time? when does it work and when it doesn't???

TheLastGimbus commented 1 year ago

will get fixed when new version with https://github.com/brendan-duncan/archive/pull/244 gets released

tribulete commented 1 year ago

Hello. I'm a bit of a novice on github flow.

When will the new release of "archive" be published and fix this issue?

TheLastGimbus commented 1 year ago

When @brendan-duncan merges it

TheLastGimbus commented 1 year ago

forgot i can just use git in pubspec :facepalm:

fixed in v3.3.4 :tada:

omlet05 commented 1 year ago

not merged correctly?