上传图片报error
Closed this issue · 2 comments
shenli19960112 commented
lianfanghua commented
我也遇到这个问题了,昨天(4月22日)上传图片没有问题,但是对话返回报502。
今天(4月23日),上传图片就报错了。
2023-04-23 10:28:52,705 [INFO] [models.py:548] 正在加载OpenAI模型: gpt-3.5-turbo
2023-04-23 10:28:52,706 [INFO] [models.py:585] 模型设置为了: gpt-3.5-turbo
2023-04-23 10:29:21,648 [INFO] [models.py:585] 模型设置为了: xmchat
2023-04-23 10:29:26,050 [INFO] [models.py:487] 尝试读取图像: /private/var/folders/mm/ycxgxph13s114fz4dl4qmfyc0000gn/T/38b8a5b2c4a8d32fe5f46b4d84a2ca6dc0318324/图片 1 11.04.42.png
2023-04-23 10:29:26,051 [INFO] [models.py:449] 读取图片文件: /private/var/folders/mm/ycxgxph13s114fz4dl4qmfyc0000gn/T/38b8a5b2c4a8d32fe5f46b4d84a2ca6dc0318324/图片 1 11.04.42.png
2023-04-23 10:29:26,083 [INFO] [models.py:492] 使用图片作为输入
Traceback (most recent call last):
File "/Users/lfh/Developer/ChuanhuChatGPT/.venv/lib/python3.9/site-packages/gradio/routes.py", line 395, in run_predict
output = await app.get_blocks().process_api(
File "/Users/lfh/Developer/ChuanhuChatGPT/.venv/lib/python3.9/site-packages/gradio/blocks.py", line 1193, in process_api
result = await self.call_function(
File "/Users/lfh/Developer/ChuanhuChatGPT/.venv/lib/python3.9/site-packages/gradio/blocks.py", line 916, in call_function
prediction = await anyio.to_thread.run_sync(
File "/Users/lfh/Developer/ChuanhuChatGPT/.venv/lib/python3.9/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/Users/lfh/Developer/ChuanhuChatGPT/.venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/Users/lfh/Developer/ChuanhuChatGPT/.venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/Users/lfh/Developer/ChuanhuChatGPT/modules/utils.py", line 114, in handle_file_upload
return current_model.handle_file_upload(*args)
File "/Users/lfh/Developer/ChuanhuChatGPT/modules/models/models.py", line 504, in handle_file_upload
response = json.loads(response.text)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
MIL-VLG commented
This is caused by the unstable networking in our school occasionally...