Open SerinitySW opened 3 years ago
This has become standard for me, making this script pretty worthless.. Constant connection and timeout issues, same exact errors
requests.exceptions.ConnectionError: HTTPConnectionPool(host='api.themoviedb.org', port=80): Max retries exceeded with url: /3/movie/1894?api_key=xxxxxxxxxx&append_to_response=videos,trailers,images,casts,translations,keywords&language=en (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x065C1FA0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
Is this still occurring? I'm hoping that the guid mapping in 2.8.1+ will cut back on the number of API requests against TMDB.
Yeah, I can't really seem to get a complete run very often. Fails almost every time
Can you post the collection and lists where this is occurring?
Absolutely. It happens randomly on random lists, but the last time it happened was on my oscar nominated collection:
Oscar Nominated:
imdb_list:
- https://www.imdb.com/list/ls054248868/
- https://www.imdb.com/list/ls024957857/
- https://www.imdb.com/list/ls076034778/
- https://www.imdb.com/list/ls076031090/
- https://www.imdb.com/list/ls076077386/
- https://www.imdb.com/list/ls073881227/
- https://www.imdb.com/list/ls073322289/
- https://www.imdb.com/list/ls073083957/
- https://www.imdb.com/list/ls071960678/
- https://www.imdb.com/list/ls071931345/
According to the logs, it happened on the 2nd list: https://ghostbin.com/paste/uhGsI
Is there anything in your network path that could be throttling your connection or are you using a VPN? socket.gaierror: [Errno -2] Name or service not known
is such a low-level error and it's odd that it would be random.
Definitely a very strange error, especially since TheMovieDB doesn’t rate limit. @mza921 I think to get to the bottom of this, we may need to enable the debug mode in tmdbv3api with tmdb.debug = True
Also weird that tmdbv3api
is trying to connect to api.themoviedb.com
on port 80 instead of port 443
Try running the docker container with -e TMDB_DEBUG_ENABLED=True
tvdbv3api
is pointing to an http endpoint instead of an https endpoint. My working hypothesis is that some environments are failing to get the redirect to https on occasion.
I think I can also alleviate some of these external API hits by having it check the guid map before hitting the TMDB API.
It looks like tmdbv3api
also has a cache that might be worth enabling
I’m hoping that changing the HTTP endpoint to an HTTPS endpoint will fix this though. I just opened an issue on that repo as well.
Also, I haven’t looked at the code in a while, but last I looked it wasn’t reusing the same tmdbv3api
object? It was reinstantiating the object for every list? If that’s still the case, it would dramatically cut down calls just by reusing the same object to avoid reauthenticating every time.
Looks like it reinstantiates for every item.
Is there anything in your network path that could be throttling your connection or are you using a VPN?
I'm not entirely sure, I'm not super network-savvy. I do know the script and Plex are not behind a VPN however. My home router is running pfSense if that helps.
Try running the docker container with -e TMDB_DEBUG_ENABLED=True
Here you go: https://ghostbin.com/paste/S9qyl
Seeing the same errors here today trying to add a ton of new collections to my config and re-running the script a few dozen times before it eventually just dies on me.
Does it eventually come back in 24 hours or something?
@burkasaurusrex
Definitely a very strange error, especially since TheMovieDB doesn’t rate limit.
https://www.themoviedb.org/talk/5317af69c3a3685c4a0003b1?language=en-US
Version 1.7.3 of tmdbv3api
dropped last week with the HTTPS fix ... will submit a PR to bump the version, but if anybody is experiencing this problem, feel free to adjust the requirements.txt
and test. Thanks.
Version 2.9.0
has the fix to the HTTPS issue mentioned above. Do you all mind retesting to see if that helped? If not, we'll need to do a lot more digging I think
Retested, getting the same error at about the same frequency. v2.9.0
Docker version 2.7.0 (Performance branch)
It's quite common for the script the crash for me with the following:
API key is censored on purpose.