I am using imdbpy to get the ratings of movies.I have succesfully installed the imdbpy but running into problem while running this small code. here is the code:
from imdb import IMDb
ia = IMDb()
the_matrix = ia.get_movie('0133093')
print the_matrix['director']
error:
from imdb import IMDb
ImportError: cannot import name IMDb
Can you give the full error trace?
One of the reasons could be that you might have saved this code in the file imdb.py
which would be shadowing the original imdb
module and that's why python can no longer import IMDb
.