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 Mi.Zou
Recipients Mi.Zou, ezio.melotti
Date 2013-02-16.12:30:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
while urllib following the redirection(302):
http.client.HTTPConnection.putrequest raise an error:
  File "D:\Program Files\Python32\lib\http\", line 1004, in _send_request
    self.putrequest(method, url, **skips)
  File "D:\Program Files\Python32\lib\http\", line 868, in putrequest
UnicodeEncodeError: 'ascii' codec can't encode characters in position 108-111: ordinal not in range(128)
in the sourcode i found that:
at line 811

def putrequest(self, method, url, skip_host=0,skip_accept_en...)

the argument url may be a unicode,and it was unquoted..
in my case:

then,the http serve redirect me to a file download url...
and the url contains some Chinese word....
i have print out the argument url:

Date User Action Args
2013-02-16 12:30:44Mi.Zousetrecipients: + Mi.Zou, ezio.melotti
2013-02-16 12:30:44Mi.Zousetmessageid: <>
2013-02-16 12:30:44Mi.Zoulinkissue17214 messages
2013-02-16 12:30:44Mi.Zoucreate