[mythtv-users] tmdb3 wonkiness

jrh jharbestonus at gmail.com
Fri Sep 18 11:53:16 UTC 2015


> 
> Traceback (most recent call last):
>    File "/usr/share/mythtv/metadata/Movie/tmdb3.py", line 300, in <module>
>      main()
>    File "/usr/share/mythtv/metadata/Movie/tmdb3.py", line 294, in main
>      buildSingle(args[0], opts)
>    File "/usr/share/mythtv/metadata/Movie/tmdb3.py", line 88, in buildSingle
>      if cast.profile: d['thumb'] = cast.profile.geturl()
>    File "/usr/lib64/python2.7/site-packages/MythTV/tmdb3/util.py", line 153, in __get__
>      self.poller.__get__(inst, owner)()
>    File "/usr/lib64/python2.7/site-packages/MythTV/tmdb3/util.py", line 80, in __call__
>      self.apply(req.readJSON())
>    File "/usr/lib64/python2.7/site-packages/MythTV/tmdb3/cache.py", line 118, in __call__
>      data = self.func(*args, **kwargs)
>    File "/usr/lib64/python2.7/site-packages/MythTV/tmdb3/request.py", line 128, in readJSON
>      handle_status(data, url)
>    File "/usr/lib64/python2.7/site-packages/MythTV/tmdb3/request.py", line 163, in handle_status
>      status = status_handlers[data.get('status_code', 1)]
> KeyError: 25
> 
> 
> Any ideas on how to fix this?
> 
> Status code 25 means that you have exceeded 40 requests in 10 seconds from your IP address.  What is needed is to add support for retries using the 'Retry-After' header, and/or keep track of the limit by using the 'X-RateLimit' header.
> 
> http://docs.themoviedb.apiary.io/ <http://docs.themoviedb.apiary.io/>
> 
> 
> 
> A-ha!  Thanks for the response.  I parsed my pastebin above, and it is, indeed, erroring out on retrieval #41.
> 
> Myth gurus - is there anything in the retrieval script that limits the number of queries?  Am I the only one seeing this?  Does Myth need to pull the pages for all of the individuals listed on the credits?
> 
I used the modification in the https://code.mythtv.org/trac/ticket/12455 <https://code.mythtv.org/trac/ticket/12455>  to fix mine. you basically just need to edit request.py mentioned above, and replace the original function with the modified function.

Not sure how to get it into the future .27 version. Maybe one of the devs can move it into place.

Regards,

Jay



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20150918/87c7dc44/attachment.html>


More information about the mythtv-users mailing list