cecobask/imdb-trakt-sync

failure unmarshalling trakt response

Closed this issue · 4 comments

I get the following error when trying to sync my imdb lists (just for this one list, 3 others sync fine).

{"level":"fatal","time":"2023-04-12T13:25:30Z","caller":"syncer/syncer.go:96","message":"failure syncing lists","error":"failure adding items to trakt list films-to-watch: failure unmarshalling trakt response: EOF","stacktrace":"github.com/cecobask/imdb-trakt-sync/pkg/syncer.(*Syncer).Run\n\t/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/pkg/syncer/syncer.go:96\nmain.main\n\t/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/cmd/syncer/main.go:8\nruntime.main\n\t/opt/hostedtoolcache/go/1.18.10/x64/src/runtime/proc.go:250"}
This happens whether I define the lists by their ID, or choose "all". Running with dry-run works fine, it lists all the titles that it would have added, but running it in "full" mode returns the above message. The list is large - 1029 items, though I have trakt vip to support that list size. I tried it with reducing the number of items and it still didn't work. Running it with just the other 3 lists works fine (largest one of those is 702 items).

Please let me know if you have any suggestions or if you need any other information.

Hi @kman12312,

I think the issue might have to do with a certain max number of list items sent in a single HTTP request to the users/:id/lists/:list_id/items endpoint. I know that VIP users have higher limits than regular users, but I am not sure whether this limit also applies to the number of list items in a single HTTP request.

Could you please send me a link to your biggest IMDb list? It will have to be public for me to see it. If you're not comfortable sharing the link here, you can email me at baskski@gmail.com.

I will export your list to a CSV file and import it to my IMDb account. Finally, I will run the syncer and I should be able to reproduce the error locally. This will allow me to debug and come up with a solution.

I sent you an e-mail, thanks.

@kman12312, try pulling the latest changes to your fork and syncing.
It should be working as expected now. Let me know how it goes for you 🙂

Yep all working now, thanks!