1. Davide Alberani
  2. imdbpy
  3. Issues
Issue #18 resolved

AttributeError when calling search_movie('red dragon')

created an issue

search_movie('red dragon') produces an error...

>>> i = imdb.IMDb()
>>> i.search_movie('red dragon')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/my-env/src/imdbpy/imdb/Movie.py", line 327, in __repr__
    if self.has_key('long imdb episode title'):
  File "/my-env/src/imdbpy/imdb/utils.py", line 1499, in has_key
  File "/home/gueux/django-videodb/videodb-env/src/imdbpy/imdb/utils.py", line 1447, in __getitem__
    value = self._getitem(key)
  File "/my-env/src/imdbpy/imdb/Movie.py", line 227, in _getitem
    return build_title(self.data)
  File "/my-env/src/imdbpy/imdb/utils.py", line 534, in build_title
  File "/my-env/src/imdbpy/imdb/utils.py", line 525, in build_title
    kind = title_dict.get('kind')
AttributeError: 'unicode' object has no attribute 'get'
[<Movie id:0289765[http] title:_Dragon rouge (2002)_>, <Movie id:0110054[http] title:_La légende du dragon rouge (1994)_>, <Movie id:0038017[http] title:_The Red Dragon (1945)_>, <Movie id:0362552[http] title:_A Director's Journey: The Making of 'Red Dragon' (2003) (V)_>, <Movie id:0361750[http] title:_Inside 'Red Dragon' (2002) (TV)_>, <Movie id:0251518[http] title:_Kokkinos drakos (1998)_>, <Movie id:0960087[http] title:_Sekiryû no onna (2006)_>, <Movie id:0220542[http] title:_The House of the Red Dragon (1969)_>, >>> 

Comments (1)

  1. Log in to comment