homepage

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 orsenthil, swaroopch
Date 2008年09月03日.16:55:35
SpamBayes Score 7.136901e-06
Marked as misclassified No
Message-id <1220460937.15.0.250530944461.issue3763@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008年09月03日 16:55:37orsenthilsetrecipients: + orsenthil, swaroopch
2008年09月03日 16:55:37orsenthilsetmessageid: <1220460937.15.0.250530944461.issue3763@psf.upfronthosting.co.za>
2008年09月03日 16:55:36orsenthillinkissue3763 messages
2008年09月03日 16:55:35orsenthilcreate

AltStyle によって変換されたページ (->オリジナル) /