With the example script on http://imdbpy.sourceforge.net/index.php?page=docs,
the following problem with proxy occurs


2010-02-26 16:04:12,280 CRITICAL [imdbpy]
> c:\python26\lib\site-packages\imdbpy-4.4-py2.6-win32.egg\imdb\_exceptions.py:35:
> IMDbDataAccessError exception raised; args: ({'url': '
> http://akas.imdb.com/find?s=tt;mx=20;q=The+Untouchables', 'error type':
> 'http_error_default', 'errcode': 403, 'headers': <httplib.HTTPMessage
> instance at 0x00D952D8>, 'proxy': '', 'errmsg': 'Forbidden'},); kwds: {}

None

Traceback (most recent call last):

  File "C:\Program
> Files\Apache2.2\htdocs\IMDB\YQuestLanguageModel\src\test_main.py", line 20,
> in <module>

    s_result = ia.search_movie('The Untouchables')

  File
> "c:\Python26\lib\site-packages\imdbpy-4.4-py2.6-win32.egg\imdb\__init__.py",
> line 381, in search_movie

    res = self._search_movie(title, results)

  File
> "c:\Python26\lib\site-packages\imdbpy-4.4-py2.6-win32.egg\imdb\parser\http\__init__.py",
> line 431, in _search_movie

    cont = self._get_search_content('tt', title, results)

  File
> "c:\Python26\lib\site-packages\imdbpy-4.4-py2.6-win32.egg\imdb\parser\http\__init__.py",
> line 414, in _get_search_content

    cont = self._retrieve(imdbURL_find % params)

  File
> "c:\Python26\lib\site-packages\imdbpy-4.4-py2.6-win32.egg\imdb\parser\http\__init__.py",
> line 400, in _retrieve

    return self.urlOpener.retrieve_unicode(url, size=size)

  File
> "c:\Python26\lib\site-packages\imdbpy-4.4-py2.6-win32.egg\imdb\parser\http\__init__.py",
> line 167, in retrieve_unicode

    uopener = self.open(url)

  File "c:\Python26\lib\urllib.py", line 206, in open

    return getattr(self, name)(url)

  File "c:\Python26\lib\urllib.py", line 361, in open_http

    return self.http_error(url, fp, errcode, errmsg, headers)

  File "c:\Python26\lib\urllib.py", line 378, in http_error

    return self.http_error_default(url, fp, errcode, errmsg, headers)

  File
> "c:\Python26\lib\site-packages\imdbpy-4.4-py2.6-win32.egg\imdb\parser\http\__init__.py",
> line 221, in http_error_default

    'proxy': self.get_proxy()}

imdb._exceptions.IMDbDataAccessError: {'url': '
> http://akas.imdb.com/find?s=tt;mx=20;q=The+Untouchables', 'error type':
> 'http_error_default', 'errcode': 403, 'headers': <httplib.HTTPMessage
> instance at 0x00D952D8>, 'proxy': '', 'errmsg': 'Forbidden'}


Even if a proxy(http://localhost:80) is provided, 404 error is returned

2010-02-26 16:05:36,203 WARNING [imdbpy.parser.http.urlopener]
> c:\python26\lib\site-packages\imdbpy-4.4-py2.6-win32.egg\imdb\parser\http\__init__.py:214:
> 404 code returned for //akas.imdb.com/find?s=tt;mx=20;q=The+Untouchables:
> Not Found (headers: Date: Fri, 26 Feb 2010 15:05:36 GMT


> Server: Apache/2.2.13 (Win32) PHP/5.2.10


> Content-Length: 202


> Connection: close


> Content-Type: text/html; charset=iso-8859-1


> )

Traceback (most recent call last):

  File "C:\Program
> Files\Apache2.2\htdocs\IMDB\YQuestLanguageModel\src\test_main.py", line 27,
> in <module>

    the_unt = s_result[0]

IndexError: list index out of range



I use Python 2.6.4 and IMDBpy 4.4. Please update if you have any ideas on
the problem.

Thanks,
Saruke.
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Imdbpy-help mailing list
Imdbpy-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-help

Reply via email to