[Imdbpy-devel] get_top250_movies()

36 views
Skip to first unread message

Wu Mao

unread,
Dec 14, 2012, 1:13:55 AM12/14/12
to imdbpy...@lists.sourceforge.net
Hello,
I'm new to IMDbPY and can't solve this problem with get_top250_movies().
Any advice?  Thanks in advance.

>>> from imdb import IMDb
>>> a=IMDb()
>>> a.get_top250_movies()

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packag
es/IMDbPY-4.9-py2.7-macosx-10.6-intel.egg/imdb/__init__.py", line 640, in get_top25
0_movies
    res = self._get_top_bottom_movies('top')
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packag
es/IMDbPY-4.9-py2.7-macosx-10.6-intel.egg/imdb/parser/http/__init__.py", line 827,
in _get_top_bottom_movies
    cont = self._retrieve(url)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packag
es/IMDbPY-4.9-py2.7-macosx-10.6-intel.egg/imdb/parser/http/__init__.py", line 444,
in _retrieve
    ret = self.urlOpener.retrieve_unicode(url, size=size)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packag
es/IMDbPY-4.9-py2.7-macosx-10.6-intel.egg/imdb/parser/http/__init__.py", line 192,
in retrieve_unicode
    uopener = self.open(url)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py",
 line 179, in open
    fullurl = unwrap(toBytes(fullurl))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py",
 line 1056, in unwrap
    url = url.strip()
AttributeError: 'tuple' object has no attribute 'strip'

>>> 

Davide Alberani

unread,
Dec 14, 2012, 2:37:37 PM12/14/12
to Wu Mao, IMDbPY development
On Fri, Dec 14, 2012 at 7:13 AM, Wu Mao <acto...@gmail.com> wrote:
>
> I'm new to IMDbPY and can't solve this problem with get_top250_movies().
> Any advice? Thanks in advance.

Hi,
this bug is fixed in the repository version (which, by the way, is
also absolutely
needed for any kind of search).

Please download it from here: https://bitbucket.org/alberanid/imdbpy


--
Davide Alberani <davide....@gmail.com> [PGP KeyID: 0x465BFD47]
http://www.mimante.net/

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Imdbpy-devel mailing list
Imdbpy...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel
Reply all
Reply to author
Forward
0 new messages