Closed Mozzo1000 closed 6 years ago
This issue happens because the OMDb response for Rotten tomato score among others except IMDB is returned in an array. If Rotten Tomato score exists then it will (so far) always be in position 1 hence item['Ratings'][1]['Source']
. But if there is less than one in the array then I can't choose position 1(count from 0) to be selected.
OMDb response that fails in this manner -
{"Title":"Der Bär ist los! Die Geschichte von Bruno","Year":"2009","Rated":"N/A","Released":"25 Feb 2009","Runtime":"N/A","Genre":"Drama","Director":"Xaver Schwarzenberger","Writer":"Felix Mitterer (screenplay)","Actors":"Harald Krassnitzer, Fritz Karl, Nadeshda Brennicke, Erwin Steinhauer","Plot":"N/A","Language":"German","Country":"Germany, Austria","Awards":"N/A","Poster":"https://ia.media-imdb.com/images/M/MV5BY2ZmMjkwZGUtMzViNy00NTY5LTk1NDMtMGYyMjI1MDFkMmFjXkEyXkFqcGdeQXVyMzA3Njg4MzY@._V1_SX300.jpg","Ratings":[{"Source":"Internet Movie Database","Value":"4.9/10"}],"Metascore":"N/A","imdbRating":"4.9","imdbVotes":"36","imdbID":"tt1249295","Type":"movie","DVD":"N/A","BoxOffice":"N/A","Production":"N/A","Website":"N/A","Response":"True"}
Crashes when running
movielst
after index, clean installation.PLATFORM : Windows10 PYTHON VERSION : Python 3.6.3