Error deploying on the cloud

KeyError: ‘st.session_state has no key “data”. Did you forget to initialize it? More info: Add statefulness to apps<!-- --> - Streamlit Docs

Traceback:

File "C:\Users\Pichau\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)File "C:\Users\Pichau\Projetos\Scripts\GitClones\Processo Seletivo Fatorial\ProcessoSeletivoFatorial\pages\3_Diretores.py", line 8, in <module>
    df_data = st.session_state["data"]File "C:\Users\Pichau\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\runtime\state\session_state_proxy.py", line 90, in __getitem__
    return get_session_state()[key]File "C:\Users\Pichau\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\runtime\state\safe_session_state.py", line 89, in __getitem__
    return self._state[key]File "C:\Users\Pichau\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\runtime\state\session_state.py", line 396, in __getitem__
    raise KeyError(_missing_key_error_message(key))

Here is the link to my repository, if you want to take a look and help me: GitHub - rcgaui/Ferramenta-Assessores-e-Diretores at master

Hey @rcgaui,

It looks like that repo is private. Can you please share a runnable code snippet?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.