timeliner icon indicating copy to clipboard operation
timeliner copied to clipboard

Can't add location data to items Google Photos Takeout archive

Open tetebueno opened this issue 4 years ago • 2 comments

Hi, I'm trying to download all Google Photos data using the API datasource and then merging with the Takeout archive, but when I try to merge the Takeout file nothing seems to happen.

Here are the commands I try:

$ timeliner add-account google_photos/[email protected]
# Browser opens up and all permissions are granted.

$ timeliner -v get-all google_photos/[email protected]
2021/01/08 20:03:18 [DEBUG] google_photos/[email protected]: listing albums: next page (page_token=)
2021/01/08 20:03:37 [DEBUG] google_photos/[email protected]: visiting item graph 0xc00078e... (node_item_id=... edges=0 collections=0 relations=0)
2021/01/08 20:03:37 [DEBUG] google_photos/[email protected]: visiting item graph 0xc00078e... (node_item_id=... edges=0 collections=0 relations=0)
2021/01/08 20:03:39 [DEBUG] google_photos/[email protected]: stored or updated item in database (item_id=... item_row_id=1 soft_merge=false)
2021/01/08 20:03:39 [DEBUG] google_photos/[email protected]: stored or updated item in database (item_id=... item_row_id=2 soft_merge=false)
2021/01/08 20:03:40 [DEBUG] google_photos/[email protected]: downloaded data file (item_id=... filename=data/2020/12/google_photos/IMG_20201229_093541_232.jpg size=139644)
2021/01/08 20:03:40 [DEBUG] google_photos/[email protected]: downloaded data file (item_id=... filename=data/2019/10/google_photos/IMG_20191030_204711.jpg size=1658519)
# Everything is added in place (this is a test account with a couple of photos only).

$ timeliner -v -merge=soft,id,file,meta import takeout.tgz google_photos/[email protected]
# Nothing happens...

I checked latitude and longitude fields in the Items table in the DB but nothing is updated (files in the data folder are not updated either, but I think that's not how the merge works).

Let me know if there's a way to get more debug info from this use case. I'm aware that there's not much information here from a troubleshooting perpective.

tetebueno avatar Jan 09 '21 02:01 tetebueno

Hi, that's weird.

Does it just hang and run forever? While it's doing nothing, is your CPU active?

If you have the means, could you add some log.Println() lines in this function:

https://github.com/mholt/timeliner/blob/41cce90c698bf35d1f3985b5b50fa029d9ed9fef/datasources/googlephotos/takeoutarchive.go#L20

and in the archiver.Walk() as well -- that will help trace the program's execution. You can also send it SIGQUIT (Ctrl+\ (on Linux) to have it dump goroutine stacks and exit. It will be interesting to know where it gets hung up.

mholt avatar Jan 09 '21 06:01 mholt

Does it just hang and run forever? While it's doing nothing, is your CPU active?

It runs, then it stops.

I'll give those debugging recommendations a try when I get the chance and get back to you.

Cheers.

tetebueno avatar Jan 13 '21 02:01 tetebueno