[Fixed]-Import TMDB3 package in django views

1πŸ‘

βœ…

It looks like pytmdb3 does not support Python 3. You could try tmdbsimple instead, which appears to support Python 2. Your other options are to switch to Python 2 (not ideal) or update pytmdb3 to support Python 3.

The specific error is from this line in tmdb3\__init__.py

from tmdb_api import Configuration, searchMovie, searchMovieWithYear, \

For Python 3, this should be either

from tmdb.tmdb_api import Configuration, searchMovie, searchMovieWithYear, \

or

from .tmdb_api import Configuration, searchMovie, searchMovieWithYear, \

However, you will probably get other errors once you change that line.

πŸ‘€Alasdair

Leave a comment