Hi
I'm trying to retrieve the cast for a movie.
I've taken the example in the readme:
#!/usr/bin/env python3
import imdb
i = imdb.IMDb(accessSystem='http')
movie = i.get_movie('0075860')
# Get the 7th Person object in the cast list
cast = movie['cast'][6]
# Will print "Warren J. Kemmerling"
print (ast['name'])
# Will print "Wild Bill"
print (cast.currentRole)
# Will print "(as Warren Kemmerling)"
print (cast.notes)
# Get the 5th Person object in the list of writers
writer = movie['writer'][4]
# Will print "Steven Spielberg"
print (writer['name'])
# Will print "written by", because that was duty of Steven Spielberg,
# as a writer for the movie.
print (writer.notes)
However, I get the following error:
File "./test.py", line 8, in <module>
cast = movie['cast'][6]
File "/usr/local/lib/python3.4/dist-packages/imdb/utils.py", line 1468, in
__getitem__
rawData = self.data[key]
KeyError: 'cast'
Please advise how I get the cast for a movie.
Many thanks.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Imdbpy-help mailing list
Imdbpy-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-help