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 orsenthil
Recipients david193, orsenthil
Date 2011-02-21.01:51:04
SpamBayes Score 2.0863058e-06
Marked as misclassified No
Message-id <20110221015054.GA4234@kevin>
In-reply-to <1298239651.85.0.222287222979.issue11261@psf.upfronthosting.co.za>
Content
On Sun, Feb 20, 2011 at 10:07:31PM +0000, David Phillips wrote:

> The following code works on python 3.1.3 but fails on Python 3.2rc2
> (r32rc2:88269, Jan 30 2011, 14:30:28). (I run Mac OS X, version
> 10.6.6.)

Is that a real world code? (As in used in production)?  Because,
things have been a bit tightened in 3.2 and it expects data to be
bytes and throws an exception if it is not bytes.

urlencode will output str and you have explicitly encode it to bytes
(Using the value Accept-Encoding response header) before you send the
data to urlopen. The updated docs reflect this change.
History
Date User Action Args
2011-02-21 01:51:05orsenthilsetrecipients: + orsenthil, david193
2011-02-21 01:51:04orsenthillinkissue11261 messages
2011-02-21 01:51:04orsenthilcreate