[Python] Is LangGraph unable to access Streamlit's st.experimental_user.email attribute?

Discussão em 'Python' iniciado por Stack, Junho 19, 2025.

  1. Stack

    Stack Membro Participativo

    Github Link

    #Error I am receiving:

    When trying to access the database via the chatbot in create_resume, langgraph correctly calls my function setup as a tool: get_user_info, however it is unable to get the st.experimental_user.email key when get_user_information is called in my tools_firebase.py

    Within my tools_langgraph.py file, get_user_info method:

    Error: KeyError('st.experimental_user has no key "email".')


    I tried printing st.experimental_user.email inside functions to see if it existed or if it timed out, it seems to print except inside get_user_info where it doesn’t.

    What I’ve Tried

    I tried moving my functions inside the tools_langgraph.py method. I am thinking perhaps LangGraph cannot access streamlit’s session_state? What’s a way around this or what’s the best procedure to handle this when trying to use LangGraph with streamlit to create an interactive bot.

    Background

    I am using OAuth from Google and I’m depending on if st.experimental_user.email exists, if not then the user has to log in. Almost like a “premium” view vs “free” view.

    Continue reading...

Compartilhe esta Página