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

[BUG] 运行webui.py报错:AssertionError: please call init_session first #1323

Closed
518jelly opened this issue Aug 31, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@518jelly
Copy link

问题描述
按“开发环境准备”章节成功完成环境配置及Langchain-Chatchat安装后,运行Webui python webui.py,报错:
Langchain-Chatchat]# python webui.py
2023-08-31 10:09:53.053 WARNING streamlit.runtime.state.session_state_proxy: Session state does not function when running a script without streamlit run
2023-08-31 10:09:53.058
Warning: to view this Streamlit app on a browser, run it with the following
command:
streamlit run webui.py [ARGUMENTS]
Traceback (most recent call last):
File "/opt/Langchain-Chatchat/webui.py", line 70, in
pages[selected_page]"func"
File "/opt/Langchain-Chatchat/webui_pages/dialogue/dialogue.py", line 40, in dialogue_page
chat_box.init_session()
File "/root/miniconda3/envs/langchin-chatglm01/lib/python3.10/site-packages/streamlit_chatbox/messages.py", line 35, in init_session
self.reset_history(self._chat_name)
File "/root/miniconda3/envs/langchin-chatglm01/lib/python3.10/site-packages/streamlit_chatbox/messages.py", line 38, in reset_history
assert self.chat_inited, "please call init_session first"
AssertionError: please call init_session first

复现问题的步骤

  1. 安装配置minconda环境
  2. 创建虚拟环境,配置python版本==3.10.4
  3. git clone Langchain-Chatchat.git
  4. pip install -r requirements.txt
    报错,根据提示ip install setuptools_scm后,再执行pip install -r requirements.txt成功
  5. 运行webUI,遇到上述错误

*预期的结果
成功运行python webui.py
实际结果
报错.

**环境信息 **

  • langchain-ChatGLM 版本/commit 号:0.2.2
  • 是否使用 Docker 部署(是/否):否
  • 操作系统及版本 / Operating system and version: CentOS Linux release 7.9.2009
  • Python 版本 / Python version:3.10.4
  • 其他相关环境信息 / Other relevant environment information: streamlit-chatbox1.1.7
@518jelly 518jelly added the bug Something isn't working label Aug 31, 2023
@liunux4odoo
Copy link
Collaborator

streamlit run webui.py

@518jelly
Copy link
Author

streamlit run webui.py

可以了,Thank you very much

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