Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

单独运行streamlit run webui.py时出现TypeError: 'NoneType' object is not iterable #2624

Closed
uirlx opened this issue Jan 11, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@uirlx
Copy link

uirlx commented Jan 11, 2024

2024-01-11 09:24:05,102 - utils.py[line:95] - ERROR: ConnectError: error when post /llm_model/list_running_models: [Errno 111] Connection refused
2024-01-11 09:24:05,102 - utils.py[line:95] - ERROR: ConnectError: error when post /llm_model/list_running_models: [Errno 111] Connection refused
2024-01-11 09:24:05,103 - utils.py[line:95] - ERROR: ConnectError: error when post /llm_model/list_running_models: [Errno 111] Connection refused
2024-01-11 09:24:05,207 - utils.py[line:95] - ERROR: ConnectError: error when post /llm_model/list_running_models: [Errno 111] Connection refused
2024-01-11 09:24:05,208 - utils.py[line:95] - ERROR: ConnectError: error when post /llm_model/list_running_models: [Errno 111] Connection refused
2024-01-11 09:24:05,209 - utils.py[line:95] - ERROR: ConnectError: error when post /llm_model/list_running_models: [Errno 111] Connection refused
2024-01-11 09:24:05.209 Uncaught app exception
Traceback (most recent call last):
File "/home/hanjiale/m/miniconda/envs/LangChain/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
exec(code, module.dict)
File "/home/hanjiale/hjl/Private_Chat_GLM/Langchain-Chatchat-master/webui.py", line 64, in
pages[selected_page]["func"](api=api, is_lite=is_lite)
File "/home/hanjiale/hjl/Private_Chat_GLM/Langchain-Chatchat-master/webui_pages/dialogue/dialogue.py", line 165, in dialogue_page
running_models = list(api.list_running_models())
TypeError: 'NoneType' object is not iterable

@uirlx uirlx added the bug Something isn't working label Jan 11, 2024
Copy link

dosubot bot commented Jan 11, 2024

🤖

你好,@uirlx!我是Dosu,一个程序化的助手,我能够帮助你解决错误,回答你的问题,甚至帮助你成为一个贡献者。虽然我是一个机器人,但我会在等待人工维护者的过程中,尽我所能提供帮助。很高兴见到你,希望我们能够一起解决这个问题。

根据您提供的错误日志,问题出在 dialogue_page 函数中的 api.list_running_models() 返回了一个 None 类型的对象,而您试图将其转换为列表。这个函数的目的是从 fastchat 控制器获取当前已加载的模型及其配置列表。

Langchain-Chatchat 仓库中,我找到了几个类似的已解决问题,可能对您有所帮助:

  1. TypeError: 'NoneType' object is not iterable(本地部署)
    这个问题的建议解决方案是更改端口号为3开头的数字,或者尝试使用 vscode ssh 模式在命令行启动。

  2. 在streamlit run webui.py的时候出现TypeError: 'NoneType' object is not iterable
    这个问题的讨论中提供了几个可能的解决方案,包括安装特定版本的 httpx 库,使用本地模型和非 OpenAI 在线模型,更新到最新的代码,或者直接使用 Python 运行应用而不是使用 Streamlit。

  3. [BUG] 添加知识库后对话页面出错
    这个问题的建议解决方案是更新到最新的代码,并按照 wiki 的指示进行配置。使用完全离线的解决方案应该不会出现这个问题。

希望这些信息对您有所帮助。如果问题仍然存在,或者您有其他问题,欢迎随时向我提问。

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@zRzRzRzRzRzRzR zRzRzRzRzRzRzR self-assigned this Jan 11, 2024
@zRzRzRzRzRzRzR
Copy link
Collaborator

因为没有运行后端,没有找到对应的模型

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants