提交对话后出现错误。 "The submission of the dialogue resulted in an error."
lugangmail opened this issue · comments
"Hello!
I deployed your program, modified the baseurl (I used the address of a reverse proxy, hoping it can be used without going through a vpn), and then entered the Key in the interface.
After entering the dialogue in the interface and submitting it, the following error occurred.
What could be the reason? Please point it out, thank you!"
你好!
我部署了你的程序,修改了baseurl(我用的反向代理的地址,希望不翻墙的时候也可以用),然后在界面输入了Key。
当我在界面输入对话并提交了以后,出现如下错误。
请问是什么原因?请指正,谢谢!
2024-01-11 08:50:42.441 Uncaught app exception
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 534, in _run_script
exec(code, module.dict)
File "D:\python\ChatGPT-Assistant-main\app.py", line 59, in
st.write("---")
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\runtime\metrics_util.py", line 396, in wrapped_func
result = non_optional_func(*args, **kwargs)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\elements\write.py", line 268, in write
flush_buffer()
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\elements\write.py", line 185, in flush_buffer
self.dg.markdown(
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\runtime\metrics_util.py", line 396, in wrapped_func
result = non_optional_func(*args, **kwargs)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\elements\markdown.py", line 106, in markdown
return self.dg._enqueue("markdown", markdown_proto)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\delta_generator.py", line 532, in _enqueue
_enqueue_message(msg)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\delta_generator.py", line 873, in _enqueue_message
ctx.enqueue(msg)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\runtime\scriptrunner\script_run_context.py", line 108, in enqueue
self._enqueue(msg)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 321, in _enqueue_forward_msg
self.on_event.send(
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\blinker\base.py", line 293, in send
if is_coroutine_function(receiver):
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\blinker_utilities.py", line 117, in is_coroutine_function
return asyncio.iscoroutinefunction(func)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\asyncio\coroutines.py", line 166, in iscoroutinefunction
return (inspect.iscoroutinefunction(func) or
File "D:\ProgramData\Anaconda3\envs\langchain\lib\inspect.py", line 194, in iscoroutinefunction
return _has_code_flag(obj, CO_COROUTINE)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\inspect.py", line 175, in _has_code_flag
while ismethod(f):
File "D:\ProgramData\Anaconda3\envs\langchain\lib\inspect.py", line 88, in ismethod
return isinstance(object, types.MethodType)
RecursionError: maximum recursion depth exceeded while calling a Python object
这个报错看上去貌似不在于项目本身代码上。 使用的是streamlit版本是多少,可以更改下版本试试。
在不指定baseurl的情况下会报错吗?
谢谢你的回复!
我的版本是1.28.
我在不设置baseurl的情况下,会出现如下错误。
我不知道不使用反向代理和使用反向代理使用的key是否一样。
我现在本身是翻墙状态的。
RecursionError: maximum recursion depth exceeded while calling a Python object
Traceback:
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 534, in _run_script
exec(code, module.dict)
File "D:\python\ChatGPT-Assistant-main\app.py", line 59, in
st.write("---")
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\runtime\metrics_util.py", line 396, in wrapped_func
result = non_optional_func(*args, **kwargs)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\elements\write.py", line 268, in write
flush_buffer()
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\elements\write.py", line 185, in flush_buffer
self.dg.markdown(
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\runtime\metrics_util.py", line 396, in wrapped_func
result = non_optional_func(*args, **kwargs)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\elements\markdown.py", line 106, in markdown
return self.dg._enqueue("markdown", markdown_proto)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\delta_generator.py", line 532, in _enqueue
_enqueue_message(msg)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\delta_generator.py", line 873, in _enqueue_message
ctx.enqueue(msg)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\runtime\scriptrunner\script_run_context.py", line 108, in enqueue
self._enqueue(msg)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 321, in _enqueue_forward_msg
self.on_event.send(
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\blinker\base.py", line 293, in send
if is_coroutine_function(receiver):
File "D:\ProgramData\Anaconda3\envs\langchain\lib\site-packages\blinker_utilities.py", line 117, in is_coroutine_function
return asyncio.iscoroutinefunction(func)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\asyncio\coroutines.py", line 166, in iscoroutinefunction
return (inspect.iscoroutinefunction(func) or
File "D:\ProgramData\Anaconda3\envs\langchain\lib\inspect.py", line 194, in iscoroutinefunction
return _has_code_flag(obj, CO_COROUTINE)
File "D:\ProgramData\Anaconda3\envs\langchain\lib\inspect.py", line 175, in _has_code_flag
while ismethod(f):
File "D:\ProgramData\Anaconda3\envs\langchain\lib\inspect.py", line 88, in ismethod
return isinstance(object, types.MethodType)
应该和设置反向代理、是否翻墙没什么关系。可以更改下streamlit的版本试试,我开发这个项目时streamlit的版本是1.20.0
谢谢!降低版本就可以了。
还是希望新版本可用。
使用正确的streamlit版本可以解决如上错误