This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zhang.kai
Recipients zhang.kai
Date 2012-09-12.05:44:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347428702.03.0.0537807562119.issue15928@psf.upfronthosting.co.za>
In-reply-to
Content
Here is the code which causes this bug:
 proxy_handler = urllib2.ProxyHandler({'https': proxy})
 opener = urllib2.build_opener(proxy_handler)
 f = opener.open(url+'?'+params)

Here are the traceback information:
Traceback (most recent call last):
  File "proxy.py", line 65, in <module>
    main()
  File "proxy.py", line 62, in main
    print proxy_manager.get_proxy()
  File "proxy.py", line 45, in get_proxy
    make_request(TEST_URL, proxy=one["proxy_server"])
  File "proxy.py", line 27, in make_request
    f = opener.open(url+'?'+params)
  File "/usr/lib/python2.7/urllib2.py", line 400, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 418, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1215, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1174, in do_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "/usr/lib/python2.7/httplib.py", line 958, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 992, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 1160, in connect
    self._tunnel()
  File "/usr/lib/python2.7/httplib.py", line 748, in _tunnel
    line = response.fp.readline(_MAXLINE + 1)
TypeError: readline() takes exactly 1 argument (2 given)
History
Date User Action Args
2012-09-12 05:45:02zhang.kaisetrecipients: + zhang.kai
2012-09-12 05:45:02zhang.kaisetmessageid: <1347428702.03.0.0537807562119.issue15928@psf.upfronthosting.co.za>
2012-09-12 05:44:40zhang.kailinkissue15928 messages
2012-09-12 05:44:40zhang.kaicreate