GaiZhenbiao / ChuanhuChatGPT

GUI for ChatGPT API and many LLMs. Supports agents, file-based QA, GPT finetuning and query with web search. All with a neat UI.

Home Page:https://huggingface.co/spaces/JohnSmith9982/ChuanhuChatGPT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: 打开在线搜索出现event loop 错误

bianlongpeng opened this issue · comments

这个bug是否已存在现有issue了?

  • 我确认没有已有issue,且已阅读常见问题

错误表现

使用python=3.9版本启动部署时打开在线搜索会报错误:raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'AnyIO worker thread'
报错代码段在
image

复现操作

使用python=3.9版本部署,怀疑是低版本python和gradio的匹配问题
升级python=3.11解决,但是需要requirement.txt添加gradio[oauth]包,或者单独pip install gradio[oauth] ,可解决以上错误问题

错误日志

No response

运行环境

  • OS:
  • Browser:
  • Gradio version:
  • Python version:

帮助解决

  • 我愿意协助解决!

补充说明

No response

duckduckgo-search==4.1.1

python >= 3.10 可以解决此问题……比较奇怪,可能什么地方就不适配了吧

更新一下python版本到3.10 或 3.11,更新一下最新版看看是否已经解决?若还有问题请再继续回复该issue