chat-analyzer
chat-analyzer copied to clipboard
Cannot run
Running python Home.py and getting this error:
2024-01-30 11:54:20.127 WARNING streamlit.runtime.state.session_state_proxy: Session state does not function when running a script without streamlit run
Traceback (most recent call last):
File "C:\Users\dan_e\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\streamlit\runtime\state\session_state.py", line 398, in getitem
return self._getitem(widget_id, key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dan_e\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\streamlit\runtime\state\session_state.py", line 443, in _getitem
raise KeyError
KeyError
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\dan_e\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\streamlit\runtime\state\session_state_proxy.py", line 119, in getattr return self[key] ~~~~^^^^^ File "C:\Users\dan_e\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\streamlit\runtime\state\session_state_proxy.py", line 90, in getitem return get_session_state()[key] ~~~~~~~~~~~~~~~~~~~^^^^^ File "C:\Users\dan_e\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\streamlit\runtime\state\safe_session_state.py", line 91, in getitem return self._state[key] ~~~~~~~~~~~^^^^^ File "C:\Users\dan_e\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\streamlit\runtime\state\session_state.py", line 400, in getitem raise KeyError(_missing_key_error_message(key)) KeyError: 'st.session_state has no key "last_time". Did you forget to initialize it? More info: https://docs.streamlit.io/library/advanced-features/session-state#initialization'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Code\Python\chat-analyzer\Home.py", line 159, in
C:\Code\Python\chat-analyzer>python init.py
C:\Code\Python\chat-analyzer>python Home.py
2024-01-30 11:54:43.897 WARNING streamlit.runtime.state.session_state_proxy: Session state does not function when running a script without streamlit run
Traceback (most recent call last):
File "C:\Users\dan_e\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\streamlit\runtime\state\session_state.py", line 398, in getitem
return self._getitem(widget_id, key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dan_e\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\streamlit\runtime\state\session_state.py", line 443, in _getitem
raise KeyError
KeyError
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\dan_e\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\streamlit\runtime\state\session_state_proxy.py", line 119, in getattr return self[key] ~~~~^^^^^ File "C:\Users\dan_e\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\streamlit\runtime\state\session_state_proxy.py", line 90, in getitem return get_session_state()[key] ~~~~~~~~~~~~~~~~~~~^^^^^ File "C:\Users\dan_e\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\streamlit\runtime\state\safe_session_state.py", line 91, in getitem return self._state[key] ~~~~~~~~~~~^^^^^ File "C:\Users\dan_e\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\streamlit\runtime\state\session_state.py", line 400, in getitem raise KeyError(_missing_key_error_message(key)) KeyError: 'st.session_state has no key "last_time". Did you forget to initialize it? More info: https://docs.streamlit.io/library/advanced-features/session-state#initialization'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Code\Python\chat-analyzer\Home.py", line 159, in
Hi Since this is a streamlit app, you should run it as follows: https://docs.streamlit.io/knowledge-base/using-streamlit/how-do-i-run-my-streamlit-script
hey i am getting some issue related to secret.toml file . I need tracking pass and google site code to run the app but it doesn't exist in you github repo
please help bro I need your help
@lokeshdubey2001 you must create a secret.toml
by yourself. this file should be located: "at ~/.streamlit/secrets.toml for macOS/Linux or %userprofile%/.streamlit/secrets.toml for Windows"
Read more here
for this app, the secret.toml should contain the following values:
hf_api_token = "your_hf_code_here"
tracking_pass = "your_tacking_pass_here"
google_site_verification_code = "your_google_site_var_here"
The only relevant value your should update is the hf_api_token
see here how to create your own token