码迷,mamicode.com
首页 > Windows程序 > 详细

WINDOWS下,中文JSON格式读取报错处理:ValueError: No JSON object could be decoded

时间:2015-10-21 15:30:10      阅读:885      评论:0      收藏:0      [点我收藏+]

标签:

 

File "C:\Python27\lib\json\__init__.py", line 290, in load
**kw)
File "C:\Python27\lib\json\__init__.py", line 351, in loads
return cls(encoding=encoding, **kw).decode(s)
File "C:\Python27\lib\json\decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Python27\lib\json\decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

记得WINDOWS里的UTF-8还分有没有BOM呢~~

技术分享

WINDOWS下,中文JSON格式读取报错处理:ValueError: No JSON object could be decoded

标签:

原文地址:http://www.cnblogs.com/aguncn/p/4897758.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!