grab: GrabTimeoutError

Hello, I have exception like https://github.com/lorien/grab/issues/140, but I haven`t some DNS Errors. OS and network: OS: Windows 8 (x64) fixed DNS: 8.8.8.8

Script:

import pycurl; 
from grab import Grab
import logging

print(pycurl.version); 
print(pycurl.__file__);

logging.basicConfig(level=logging.DEBUG)
g = Grab(verbose_logging=True, debug=True)
g.go('http://github.com')
print g.xpath_text('//title')

script output:

PycURL/7.43.0 libcurl/7.47.0 OpenSSL/1.0.2f zlib/1.2.8 c-ares/1.10.0 libssh2/1.6.0
c:\Python27\lib\site-packages\pycurl.pyd
DEBUG:grab.network:[01] GET http://github.com
DEBUG:grab.transport.curl:i: Rebuilt URL to: http://github.com/
DEBUG:grab.transport.curl:i: Resolving timed out after 3000 milliseconds
DEBUG:grab.transport.curl:i: Closing connection 0
Traceback (most recent call last):
  File "D:\pr_files\source\python\planned\htmlParser\bgsParser\NewPythonProject\src\bgsParser.py", line 10, in <module>
    g.go('http://github.com')
  File "c:\Python27\lib\site-packages\grab-0.6.30-py2.7.egg\grab\base.py", line 377, in go
    return self.request(url=url, **kwargs)
  File "c:\Python27\lib\site-packages\grab-0.6.30-py2.7.egg\grab\base.py", line 450, in request
    self.transport.request()
  File "c:\Python27\lib\site-packages\grab-0.6.30-py2.7.egg\grab\transport\curl.py", line 489, in request
    raise error.GrabTimeoutError(ex.args[0], ex.args[1])
grab.error.GrabTimeoutError: [Errno 28] Resolving timed out after 3000 milliseconds

I tried to reinstall curl:

C:\Python27\Scripts>pip install pycurl-7.43.0-cp27-none-win_amd64.whl --upgrade
Processing c:\python27\scripts\pycurl-7.43.0-cp27-none-win_amd64.whl
Installing collected packages: pycurl
  Found existing installation: pycurl 7.43.0
    Uninstalling pycurl-7.43.0:
      Successfully uninstalled pycurl-7.43.0
Successfully installed pycurl-7.43.0

but It doesn`t work. What can be wrong?

Thank you for help.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 20 (6 by maintainers)

Most upvoted comments

Спасибо! Все заработало!

ramonsantiago, pycurl откатите на версию 7.19