simulot / immich-go

An alternative to the immich-CLI command that doesn't depend on nodejs installation. It tries its best for importing google photos takeout archives.
GNU Affero General Public License v3.0
1.73k stars 52 forks source link

google-photos upload "Bad Request albumName should not be empty" #62

Closed cben0ist closed 11 months ago

cben0ist commented 11 months ago

Release 0.8.0 Today I have uploaded 185GB Google Take-out zip files to my immich instance using immich-go. It took roughly 5 hours Upload went pretty smoothly with 35780 media scanned, 34158 uploaded. However It only created 35/106 albums with the following error on the 36th:

Create the album
can't create the album list from the server: CreateAlbum, POST, https://photos.128l.org/api/album, 400 Bad Request
Bad Request
albumName should not be empty

I don't see any Untitled album in my Google Photo Library. I can look into the zip files if you tell me what I should be looking for to help debug that issue. Thank you!

simulot commented 11 months ago

Yes, you can help me in the resolution of this problem. What are the command line options? Could you share the archive folder layout? I suspect a problem with album name check in the program.

cben0ist commented 11 months ago

@simulot here is what you are looking for. Let me know how I can help. Thank you!

The command: immich-go --key 123456789 --server https://immich.mysecret.domain upload -create-albums -google-photos -partner-album "blablabla" takeout-20231101T025817Z-0*.zip

The folder layout (I have redacted some parts with "xxx"). There are a lot more folers than albums I do see in Google Photos. Some of these are the Memories automagically created by Google. Lots of Untitled folders I don't have in GPhotos. I assume the 1st 2 might be the culprits (starting with a comma) or maybe the 4th one (with a ~)?

./, Diaxxx
./, Monxxx
./2 days in xxx
./2R86NS~4
./2006-02-25 - xxx
./2006-12-25 - xxx
./2006-12-31 - xxx
./2007-01-15 - xxx
./2007-07-08 - xxx
./2008-05-08 - xxx
./2009-08-28 - xxx
./2009-08-30 - xxx
./2009-09-01 - xxx
./2009-09-02 - xxx
./2009-09-03 - xxx
./2009-09-04 - xxx
./2009-09-06 - xxx
./2009-09-07 - xxx
./2009-09-08 - xxx
./2009-09-09 - xxx
./2009-09-10 - xxx
./2009-09-11 - xxx
./2009-09-12 - xxx
./2009-09-13 - xxx
./2009-09-14 - xxx
./2009-09-15 - xxx
./2010-03-13 - xxx
./2010-04
./2010-05
./2010-06
./2010-07
./2010-07-10 - xxx
./2010-07-24 - xxx
./2010-07-31 - xxx
./2010-09
./2010-09-05 - xxx
./2010-11
./2010-11-11 - xxx
./2010-11-20 - xxx
./2010-12
./2010-12-04 - xxx
./2010-12-16 - xxx
./2010-12-25 - xxx
./2010-12-31 - xxx
./2011-01-28 - xxx
./2011-03-04 - xxx
./2011-03-11 - xxx
./2011-03-29 - xxx
./2011-05-21 - xxx
./2011-05-29 - xxx
./2011-06-18 - xxx
./2011-06-19 - xxx
./2011-06-25 - xxx
./2011-07 - xxx
./2011-07-01 - xxx
./2011-07-16 - xxx
./2011-07-30 - xxx
./2011-08-01 - xxx
./2011-08-14 - xxx
./2011-08-15 - xxx
./2011-08-22 - xxx
./2011-09-03 - xxx
./2011-09-04 - xxx
./2011-09-10 - xxx
./2011-09-17 - xxx
./2011-10-30 - xxx
./2011-10-31 - xxx
./2011-11-09 - xxx
./2011-11-26 - xxx
./2011-12-25 - xxx
./2012
./2012-01-08 - xxx
./2012-02-10 - xxx
./2012-03-10 - xxx
./2012-03-25 - xxx
./2012-07-21 - xxx
./2016-06 - xxx
./2016-06 - xxx
./2018-05-19 - xxx
./2018-06-24 - xxx
./2018-08-04 - xxx
./2022 Photo Book
./2023-06-10 - xxx
./9 days in xxx
./Archive
./Camera upload
./Christmas 2019 -- xxx
./Failed Videos
./Famille
./Family _ friends
./Friday afternoon in xxx
./Liam
./Photos from 2002
./Photos from 2006
./Photos from 2007
./Photos from 2008
./Photos from 2009
./Photos from 2010
./Photos from 2011
./Photos from 2012
./Photos from 2013
./Photos from 2014
./Photos from 2015
./Photos from 2016
./Photos from 2017
./Photos from 2018
./Photos from 2019
./Photos from 2020
./Photos from 2021
./Photos from 2022
./Photos from 2023
./Print Order 400235435522519283585
./Print Order 400733147542231433136
./Print Order 406425068916935292161
./Print Order 409239376021338278427
./Print Order 415481269461383756789
./Print Order 417796788285446498760
./Print Order 418229504152677469104
./Saturday xxx
./Saturday xxx
./Spotlight on xxx
./Sunday in xxx
./Sunday in xxx
./Sunday in xxx
./Sunday in xxx
./Thursday evening in xxx
./Trash
./Trip to xxx
./Trip to xxx
./Trip to xxx
./Trip to xxx
./Trip to xxx
./Trip to xxx
./Untitled
./Untitled(1)
./Untitled(10)
./Untitled(11)
./Untitled(12)
./Untitled(13)
./Untitled(14)
./Untitled(15)
./Untitled(16)
./Untitled(17)
./Untitled(18)
./Untitled(19)
./Untitled(2)
./Untitled(20)
./Untitled(21)
./Untitled(22)
./Untitled(23)
./Untitled(24)
./Untitled(25)
./Untitled(26)
./Untitled(27)
./Untitled(28)
./Untitled(29)
./Untitled(3)
./Untitled(30)
./Untitled(31)
./Untitled(4)
./Untitled(5)
./Untitled(6)
./Untitled(7)
./Untitled(8)
./Untitled(9)
./Weekend in xxx
./Weekend in xxx
./Weekend in xxx
./Weekend in xxx
./Weekend in xxx
./Weekend in xxx(1)
./Weekend in xxx(2)
./Weekend in xxx(3)
./Weekend in xxx(4)
./Weekend in xxx(5)
./Weekend in xxx
./Wonderl xxx
simulot commented 11 months ago

Now you know how google photos takeout is a mess 😃

I never have encountered Print Orders, achive nor Camera Upload

Could you send the content of following files?

alexandru-g commented 11 months ago

@simulot thanks for the tool! I have the same issue:

can't create the album list from the server: CreateAlbum, POST, https://photos.domain.net/api/album, 400 Bad Request
Bad Request
albumName should not be empty

43062 media scanned, 42181 uploaded.

My question is: can I figure out what photos failed to upload so I can upload them separately? If I run the upload again, will it create duplicates? Thank you!

simulot commented 11 months ago

Thank you for you nice comment.

Bad Request albumName should not be empty

This shouldn't happen I'm working with @cben0ist to the debug it.

43062 media scanned, 42181 uploaded. Nice count!

My question is: can I figure out what photos failed to upload so I can upload them separately? If I run the upload again, will it create duplicates? Thank you!

In fact, all photos are uploaded. You can run immich-go as many as you want, it won't duplicate your photos. Immich-go check if the photo exists in immich-sever before post it. Immich-server check if there is any file with the same content before accepting it. So no worries.

43062 media scanned, 42181 uploaded.

The count difference is explained by duplicate images in the google takeout, or if there is already a photo in immich-server with the same name and same date of capture, but having a better resolution.

alexandru-g commented 11 months ago

In fact, all photos are uploaded. You can run immich-go as many as you want, it won't duplicate your photos. Immich-go check if the photo exists in immich-sever before post it. Immich-server check if there is any file with the same content before accepting it. So no worries.

Amazing! Thank you. I'll check back in a while and rerun when you find the google takeout issue. I think some albums are missing due to it.

simulot commented 11 months ago

A temporary fix is available with 0.8.1

alexandru-g commented 11 months ago

I can confirm the error disappeared after building from latest.