Senthil <[EMAIL PROTECTED]> added the comment:
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.
----------
components: +Library (Lib) -None
nosy: +orsenthil
type: -> behavior
_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3763>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com