pombreda / gevent

Automatically exported from code.google.com/p/gevent
0 stars 0 forks source link

exeptions output when i ran the script from concurrent_download.py #113

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the gevent are you using?
gevent-0.13.6-py2.7-linux-i686.egg
What version of libevent are you using?
2.0.12-stable-1
On what operating system?
ubuntu 11.10
On what Python?
Python 2.7.2+ (default, Oct  4 2011, 20:03:08)

debug the script from 
https://bitbucket.org/denis/gevent/src/tip/examples/concurrent_download.py#cl-4

exceptions output:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gevent-0.13.6-py2.7-linux-i686.egg/gevent/greenlet.py", line 390, in run
    result = self._run(*self.args, **self.kwargs)
  File "/home/hanson/wspython/pydev/src/Test.py", line 24, in print_head
    data = urllib2.urlopen(url).read()
  File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 394, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 412, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 372, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1201, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1174, in do_open
    r = h.getresponse(buffering=True)
  File "/usr/lib/python2.7/httplib.py", line 1027, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 407, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 371, in _read_status
    raise BadStatusLine(line)
BadStatusLine: ''
<Greenlet at 0xb742cf2cL: print_head('http://www.google.com')> failed with 
BadStatusLine

Original issue reported on code.google.com by liangguo...@gmail.com on 31 Dec 2011 at 9:39

GoogleCodeExporter commented 9 years ago
That does not seem like gevent issue. You can verify it by commenting out line 
#12 in concurrent_download.py:

    monkey.patch_all()

https://bitbucket.org/denis/gevent/src/f443b9ece804/examples/concurrent_download
.py#cl-12

Do you still have the issue without monkey patch? Can you download google.com 
with curl or with your browser?

Original comment by Denis.Bi...@gmail.com on 3 Jan 2012 at 8:55

GoogleCodeExporter commented 9 years ago
others libs is call fine, just when i call monkey.patch_all(), then the
problem is show.

Original comment by liangguo...@gmail.com on 3 Jan 2012 at 5:25

GoogleCodeExporter commented 9 years ago
Migrated to http://github.com/SiteSupport/gevent/issues/113

Original comment by Denis.Bi...@gmail.com on 14 Sep 2012 at 10:52