Message72396
On the code against the trunk, I am getting the following error:
Traceback (most recent call last):
File "python3k_json.py", line 38, in <module>
for result in search(query)['Result']:
File "python3k_json.py", line 31, in search
result = json.load(obj)
File "/usr/local/lib/python3.0/json/__init__.py", line 267, in load
parse_constant=parse_constant, **kw)
File "/usr/local/lib/python3.0/json/__init__.py", line 307, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.0/json/decoder.py", line 319, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: can't use a string pattern on a bytes-like object
Swaroop: What encoding would be the JSON File content? You can try by
passing the encoding argument to the load method. I tried latin1 and
ascii, did not help.
Few more things to note:
- The above TypeError was introduced by the fix of Issue2834.
- There are also bugs open in other modules (shutil, imaplib) where
problems with str<->bytes conversions are observed. |
|
Date |
User |
Action |
Args |
2008-09-03 16:55:37 | orsenthil | set | recipients:
+ orsenthil, swaroopch |
2008-09-03 16:55:37 | orsenthil | set | messageid: <1220460937.15.0.250530944461.issue3763@psf.upfronthosting.co.za> |
2008-09-03 16:55:36 | orsenthil | link | issue3763 messages |
2008-09-03 16:55:35 | orsenthil | create | |
|