You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since commit e038ac5 , when a search result is empty, iteration of the results instead iterates on the dictionary keys.
Searching for "Matrix", like in search_movies.py, returns 5 results that can be successfully iterated:
>>>fromtmdbv3apiimportTMDb, Search>>>tmdb=TMDb()
>>>tmdb.api_key="...">>>search=Search()
>>>results=search.movies("Matrix", year=1999)
>>>results
{'page': 1, 'results': [...], 'total_pages': 1, 'total_results': 5}
>>>len(results)
5>>>results[0]
{'adult': False, 'backdrop_path': '/ncEsesgOJDNrTUED89hYbA117wo.jpg', 'genre_ids': [28, 878], 'id': 603, 'original_language': 'en', 'original_title': 'The Matrix', 'overview': 'Set in the 22nd century, The Matrix tells the story of a computer hacker who joins a group of underground insurgents fighting the vast and powerful computers who now rule the earth.', 'popularity': 101.802, 'poster_path': '/f89U3ADr1oiB1s9GkdPOEpXUk5H.jpg', 'release_date': '1999-03-31', 'title': 'The Matrix', 'video': False, 'vote_average': 8.217, 'vote_count': 25376}
But when the query returns no valid results, it cannot be iterated directly:
Since commit e038ac5 , when a search result is empty, iteration of the results instead iterates on the dictionary keys.
Searching for "Matrix", like in search_movies.py, returns 5 results that can be successfully iterated:
But when the query returns no valid results, it cannot be iterated directly:
Expected behavior:
The text was updated successfully, but these errors were encountered: