前端如何进行调试 #4200
Answered
by
zRzRzRzRzRzRzR
gabrielpondc
asked this question in
Q&A
前端如何进行调试
#4200
-
在vscode调试前端,如何配置launch.json, {
"name": "Debug Streamlit",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/webui.py",
"args": [
"run",
"webui.py",
"--server.address", "0.0.0.0",
"--server.port", "8501",
"--theme.base", "light",
"--theme.primaryColor", "#165dff",
"--theme.secondaryBackgroundColor", "#f5f5f5",
"--theme.textColor", "#000000"
],
"console": "integratedTerminal"
} 但是报错 发生异常: KeyError
'st.session_state has no key "conversation_ids". Did you forget to initialize it? More info: https://docs.streamlit.io/library/advanced-features/session-state#initialization'
KeyError:
During handling of the above exception, another exception occurred:
File "/2T/Langchain-Ch/newnewchain/Langchain-Chatchat-master/webui_pages/dialogue/dialogue.py", line 107, in dialogue_page
st.session_state["conversation_ids"].setdefault(chat_box.cur_chat_name, uuid.uuid4().hex)
File "/2T/Langchain-Ch/newnewchain/Langchain-Chatchat-master/webui.py", line 78, in <module>
pages[selected_page]["func"](api=api, is_lite=is_lite)
KeyError: 'st.session_state has no key "conversation_ids". Did you forget to initialize it? More info: https://docs.streamlit.io/library/advanced-features/session-state#initialization' |
Beta Was this translation helpful? Give feedback.
Answered by
zRzRzRzRzRzRzR
Jun 23, 2024
Replies: 1 comment
-
streamlit 只能修改代码每次重新打开 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
zRzRzRzRzRzRzR
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
streamlit 只能修改代码每次重新打开