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 LDTech
Recipients LDTech, Mi.Zou, ezio.melotti, orsenthil, terry.reedy
Date 2013-07-16.16:43:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This problem still exist in Python 3.3.2. The following code gives you an example:

import urllib.request
url = ""
req = urllib.request.Request(url)
response = urllib.request.urlopen(req, timeout=30)
the_page ='utf-8')

Traceback (most recent call last):
  File "C:\X\", line 4, in <module>
    response = urllib.request.urlopen(req, timeout=30)
  File "C:\Python33\lib\urllib\", line 156, in urlopen
    return, data, timeout)
  File "C:\Python33\lib\urllib\", line 475, in open
    response = meth(req, response)
  File "C:\Python33\lib\urllib\", line 587, in http_response
    'http', request, response, code, msg, hdrs)
  File "C:\Python33\lib\urllib\", line 507, in error
    result = self._call_chain(*args)
  File "C:\Python33\lib\urllib\", line 447, in _call_chain
    result = func(*args)
  File "C:\Python33\lib\urllib\", line 692, in http_error_302
    return, timeout=req.timeout)
  File "C:\Python33\lib\urllib\", line 469, in open
    response = self._open(req, data)
  File "C:\Python33\lib\urllib\", line 487, in _open
    '_open', req)
  File "C:\Python33\lib\urllib\", line 447, in _call_chain
    result = func(*args)
  File "C:\Python33\lib\urllib\", line 1268, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "C:\Python33\lib\urllib\", line 1248, in do_open
    h.request(req.get_method(), req.selector,, headers)
  File "C:\Python33\lib\http\", line 1061, in request
    self._send_request(method, url, body, headers)
  File "C:\Python33\lib\http\", line 1089, in _send_request
    self.putrequest(method, url, **skips)
  File "C:\Python33\lib\http\", line 953, in putrequest
UnicodeEncodeError: 'ascii' codec can't encode characters in position 78-79: ordinal not in range(128)
Date User Action Args
2013-07-16 16:43:30LDTechsetrecipients: + LDTech, terry.reedy, orsenthil, ezio.melotti, Mi.Zou
2013-07-16 16:43:30LDTechsetmessageid: <>
2013-07-16 16:43:30LDTechlinkissue17214 messages
2013-07-16 16:43:30LDTechcreate