Message187763
Here's an example of the specific type errors raised by additional checks in the text-encoding specific methods. I believe the main improvement needed here is to mention the encoding name in the exception message:
"example".encode("rot_13")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: encoder did not return a bytes object (type=str)
b'BZh91AY&SY\xc1uvK\x00\x00\x01F\x80\x00\x10\x00"\x04\x00\x00\x10 \x000\xcd\x00\xc1\xa0P\xe2\xeeH\xa7\n\x12\x18.\xae\xc9`'.decode("bz2_codec")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: decoder did not return a str object (type=bytes) |
|
Date |
User |
Action |
Args |
2013-04-25 07:47:11 | ncoghlan | set | recipients:
+ ncoghlan, ezio.melotti, flox |
2013-04-25 07:47:11 | ncoghlan | set | messageid: <1366876031.48.0.968397795128.issue17828@psf.upfronthosting.co.za> |
2013-04-25 07:47:11 | ncoghlan | link | issue17828 messages |
2013-04-25 07:47:11 | ncoghlan | create | |
|