Opened 10 years ago

Closed 9 years ago

#12263 closed Bug Report - General (fixed)

tmdb3: crashes when area set and no rating exists

Reported by: angela.schmid@… Owned by: Karl Egly
Priority: minor Milestone: 0.27.6
Component: MythTV - Mythmetadatalookup Version: 0.27.3
Severity: medium Keywords: tmdb3
Cc: Ticket locked: no

Description

/usr/share/mythtv/metadata/Movie/tmdb3.py -l de -a DE -D 153120  --debug

...
loading http://api.themoviedb.org/3/movie/153120/releases?api_key=c27cb71cff5bd76e1a7a009380562c62
{u'countries': [], u'id': 153120}
Traceback (most recent call last):
  File "/usr/share/mythtv/metadata/Movie/tmdb3.py", line 303, in <module>
    main()
  File "/usr/share/mythtv/metadata/Movie/tmdb3.py", line 297, in main
    buildSingle(args[0], opts)
  File "/usr/share/mythtv/metadata/Movie/tmdb3.py", line 64, in buildSingle
    index = zip(*releases)[0].index(opts.country)
IndexError: list index out of range
http://api.themoviedb.org/3/movie/153120/releases?api_key=c27cb71cff5bd76e1a7a009380562c62
provides
{"id":153120,"countries":[]}

Change History (5)

comment:1 Changed 9 years ago by angela.schmid@…

The movie DB fixed something: {"id":153120,"countries":[{"certification":"12","iso_3166_1":"DE","primary":true,"release_date":"2012-12-06"}]}

Therefor the tmdb3.py doesn't crash for the given movie ID.

I don't know if it is generally fixed in code, when the countries array is empty.

comment:2 Changed 9 years ago by Karl Egly

Component: MythTV - Video LibraryMythTV - Mythmetadatalookup
Owner: changed from JYA to Karl Egly
Status: newassigned

I can still reproduce this on master for movies without release events. e.g. https://www.themoviedb.org/movie/353127-exit?language=sv

comment:3 Changed 9 years ago by Karl Dietz <dekarl@…>

In 349d3a4c9e590a568c29c0f29e66ae28267243f1/mythtv:

handle movies without any release event

Refs #12263

comment:4 Changed 9 years ago by Karl Egly

Milestone: unknown0.27.6
Status: assignedinfoneeded

Candidate for fixes/0.27 after some burning in.

comment:5 Changed 9 years ago by Karl Dietz <dekarl@…>

Resolution: fixed
Status: infoneededclosed

In e7cabeffc6475875a6814f0aa84c3c33ef44589d/mythtv:

handle movies without any release event

Fixes #12263

(cherry picked from commit 349d3a4c9e590a568c29c0f29e66ae28267243f1)

Note: See TracTickets for help on using tickets.