tmdb3.py times out

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
dcrobertson01
Newcomer
Posts: 7
Joined: Mon Aug 31, 2015 10:45 pm
New Zealand

tmdb3.py times out

Post by dcrobertson01 » Fri Feb 28, 2020 9:21 pm

Hi - am unable to load metadata for videos. When running the tmdb3.py script I get a load of data about the movie - then a time out.

Running Mythfrontend from the command line gives:

Code: Select all

2020-02-29 09:48:29.560822 I  Running Grabber: /usr/share/mythtv/metadata/Movie/tmdb3.py -l en -a US -D 19995
2020-02-29 09:49:00.099961 I  Running Grabber: /usr/share/mythtv/metadata/Movie/tmdb3.py -l en -a US -C 19995
2020-02-29 09:49:00.350459 I  Running Grabber: /usr/share/mythtv/metadata/Movie/tmdb3.py -l en -a US -C 19995
2020-02-29 09:49:00.600857 I  Metadata Lookup Failed: No Results Avatar 0 0
2020-02-29 09:49:00.601155 I  No results found for Avatar 0 0
running tmdb3.py gives:

Code: Select all

/usr/share/mythtv/metadata/Movie/tmdb3.py -l en -a US -D 19995 --debug |less
loading http://api.themoviedb.org/3/movie/19995?api_key=c27cb71cff5bd76e1a7a009380562c62&language=en
{u'adult': False,
 u'backdrop_path': u'/aHcth2AXzZSjhX7JYh7ie73YVNc.jpg',
 u'belongs_to_collection': {u'backdrop_path': u'/8nCr9W7sKus2q9PLbYsnT7iCkuT.jpg',
                            u'id': 87096,
                            u'name': u'Avatar Collection',
                            u'poster_path': u'/nslJVsO58Etqkk17oXMuVK4gNOF.jpg'},
 u'budget': 237000000,
 u'genres': [{u'id': 28, u'name': u'Action'},
             {u'id': 12, u'name': u'Adventure'},
             {u'id': 14, u'name': u'Fantasy'},
             {u'id': 878, u'name': u'Science Fiction'}],
 u'homepage': u'http://www.avatarmovie.com/',
 u'id': 19995,
 u'imdb_id': u'tt0499549',
 u'original_language': u'en',
 u'original_title': u'Avatar',
 u'overview': u'In the 22nd century, a paraplegic Marine is dispatched to the moon Pandora on a unique mission, but becomes torn between following orders and protecting an alien civilization.',
 u'popularity': 24.114,
 u'poster_path': u'/kmcqlZGaSh20zpTbuoF0Cdn07dT.jpg',
 u'production_companies': [{u'id': 444,
                            u'logo_path': u'/42UPdZl6B2cFXgNUASR8hSt9mpS.png',
                            u'name': u'Dune Entertainment',
                            u'origin_country': u'US'},
                           {u'id': 574,
                            u'logo_path': u'/iB6GjNVHs5hOqcEYt2rcjBqIjki.png',
                            u'name': u'Lightstorm Entertainment',
                            u'origin_country': u'US'},
                           {u'id': 25,
                            u'logo_path': u'/qZCc1lty5FzX30aOCVRBLzaVmcp.png',
                            u'name': u'20th Century Fox',
                            u'origin_country': u'US'},
                           {u'id': 290,
                            u'logo_path': u'/Q8mw2AOQQc8Qg0uNwLWq86DVZv.png',
                            u'name': u'Ingenious Media',
                            u'origin_country': u'GB'}],
 u'production_countries': [{u'iso_3166_1': u'US',
                            u'name': u'United States of America'},
                           {u'iso_3166_1': u'GB', u'name': u'United Kingdom'}],
 u'release_date': u'2009-12-10',
 u'revenue': 2787965087,
 u'runtime': 162,
 u'spoken_languages': [{u'iso_639_1': u'en', u'name': u'English'},
                       {u'iso_639_1': u'es', u'name': u'Espa\xf1ol'}],
 u'status': u'Released',
 u'tagline': u'Enter the World of Pandora.',
 u'title': u'Avatar',
 u'video': False,
 u'vote_average': 7.4,
 u'vote_count': 20366}
Etc - lists all the actors - victim 3, uncredited and so on, the cast etc, loads of data until

Code: Select all

           {u'credit_id': u'54959ca3c3a3686ae300438c',
            u'department': u'Visual Effects',
            u'gender': 2,
            u'id': 957874,
            u'job': u'Visual Effects Supervisor',
            u'name': u'Jonathan Rothbart',
            u'profile_path': None},
           {u'credit_id': u'570b6f519251412c74001b2f',
            u'department': u'Art',
            u'gender': 0,
            u'id': 957889,
            u'job': u'Supervising Art Director',
            u'name': u'Stefan Dechant',
            u'profile_path': None},
           {u'credit_id': u'570b6f62c3a3680b77007460',
            u'department': u'Art',
            u'gender': 2,
          ERROR: Timed out exception
then

Code: Select all

/usr/share/mythtv/metadata/Movie/tmdb3.py -l en -a US -C 19995 --debug
loading http://api.themoviedb.org/3/collection/19995?api_key=c27cb71cff5bd76e1a7a009380562c62&language=en
<?xml version='1.0' encoding='UTF-8'?>
<metadata/>
I would like to get this sorted out sometime if anyone has any ideas ....

User avatar
bill6502
Developer
Posts: 1904
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: tmdb3.py times out

Post by bill6502 » Fri Feb 28, 2020 10:27 pm

Look in /usr/share/mythtv/metadata/Movie/tmdb3.py for lines like these:

Code: Select all

signal.signal(signal.SIGALRM, timeouthandler)
signal.alarm(30)
Change 30 to 60 and give it another try. It took 45 seconds in the test above.

Ref: [98f4fc8]
Last edited by bill6502 on Fri Feb 28, 2020 10:46 pm, edited 1 time in total.
Reason: Added initial SIGALRM commit

User avatar
bill6502
Developer
Posts: 1904
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: tmdb3.py times out

Post by bill6502 » Sat Mar 14, 2020 11:53 pm

Did the above solve the problem???

Post Reply