You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/home/user/chatglm/llm_ki/fastapi_demo.py", line 41, in create_item
json_post_raw = await request.json()
File "y/lib/python3.10/site-packages/starlette/requests.py", line 252, in json
self._json = json.loads(body)
File "y/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "y/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "y/lib/python3.10/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 18 (char 17)
422 Unprocessable Entity
The text was updated successfully, but these errors were encountered:
当传入一个html 文本数据的时候就会出错
curl -X POST "http://0.0.0.0:8000" -H 'Content-Type: application/json' -d '{"promt": "
传入以上数据html文本的时候,页面自动渲染出来表格了,实际是一个html的文本:报以下错误,json解析不了,不能传html文本?只是一个文本而已为什么不能解析?传其他的文本就可以跑
File "/home/user/chatglm/llm_ki/fastapi_demo.py", line 41, in create_item
json_post_raw = await request.json()
File "y/lib/python3.10/site-packages/starlette/requests.py", line 252, in json
self._json = json.loads(body)
File "y/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "y/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "y/lib/python3.10/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 18 (char 17)
422 Unprocessable Entity
The text was updated successfully, but these errors were encountered: