Expecting value: line 1 column 1
时间: 2023-08-27 13:20:56 浏览: 393
这个错误通常是由于返回的数据不是有效的JSON格式造成的。在Python中,使用json.loads()函数来解析JSON数据时,如果数据的格式不正确,就会出现这个错误。同样,在使用爬虫时,使用res.json()方法来接收网页返回的JSON数据时,如果数据不是有效的JSON格式,也会出现这个错误。因此,要解决这个问题,你需要确保返回的数据是有效的JSON格式,可以通过检查数据的结构和内容来排除这个错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [已解决json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)](https://blog.csdn.net/yuan2019035055/article/details/128434675)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [解决json解析报错:Expecting value: line 1 column 1 (char 0)](https://blog.csdn.net/weixin_44011294/article/details/115439034)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [爬虫 res.json() 报错 requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)](https://blog.csdn.net/lyugd_dd/article/details/127053383)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文