Message215529
| Author |
Hanxue.Lee |
| Recipients |
Balthazar.Rouberol, Hanxue.Lee, antlong, barry, cvrebert, docs@python, eric.araujo, ezio.melotti, georg.brandl, hhas, jleedev, kousu, loewis, ncoghlan, pitrou, r.david.murray, serhiy.storchaka |
| Date |
2014年04月04日.15:23:44 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1396625024.64.0.99706187276.issue10976@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This seems to be an issue (bug?) for Python 3.3 When calling json.loads() with a byte array, this is the error
json.loads(response.data, 'latin-1')
TypeError: can't use a string pattern on a bytes-like object
When I decode the byte array to string
json.loads(response.data.decode(), 'latin-1')
I get this error
TypeError: bytes or integer address expected instead of str instance |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年04月04日 15:23:44 | Hanxue.Lee | set | recipients:
+ Hanxue.Lee, loewis, barry, georg.brandl, ncoghlan, hhas, pitrou, kousu, ezio.melotti, eric.araujo, r.david.murray, cvrebert, docs@python, antlong, serhiy.storchaka, Balthazar.Rouberol, jleedev |
| 2014年04月04日 15:23:44 | Hanxue.Lee | set | messageid: <1396625024.64.0.99706187276.issue10976@psf.upfronthosting.co.za> |
| 2014年04月04日 15:23:44 | Hanxue.Lee | link | issue10976 messages |
| 2014年04月04日 15:23:44 | Hanxue.Lee | create |
|