Comment #1 on issue 2616 by karsten....@gmail.com: post-review cannot post
utf-8 in summary or description
Actually body does not need to be converted.
The problem is that body is a <type 'str'>
url is of <type 'unicode>
Somewhere in the urllib2 package something happens like: url + body
To do unicode + str, the str is converted to unicode. However bytes >128
cannot be represented in unicode, hence the exception.
eg: u'www.reviewboard.com' + "\x81" => error
str(u'www.reviewboard.com') + "\x81" => 'www.reviewboard.com\x81'
It seems the str() patch is already in place for the http_post function,
but not for http_put.
So can you please update http_put similar to http_post?
- r = HTTPRequest(url, body, headers, method='PUT')
+ r = HTTPRequest(str(url), body, headers, method='PUT')
data = urllib2.urlopen(r).read()
You received this message because you are subscribed to the Google Groups
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to
For more options, visit this group at