kajarenc / stauthlib

Demo Repo
11 stars 4 forks source link

Execution Error #3

Open maopareja opened 6 days ago

maopareja commented 6 days ago

I was trying to test stauthlib but couldn’t get it to work. Below are the steps I followed:

•   Downloaded the repository: git clone https://github.com/kajarenc/stauthlib
•   Configured the secrets.toml
•   Created a virtual environment for this project: python -m venv .venv
•   Activated the environment: source .venv/bin/activate
•   Ran pip install -r requirements.txt
•   Ran streamlit run app.py

This error occurs:

2024-10-13 10:59:13.524 Uncaught app exception Traceback (most recent call last): File "/Users/usertest/.pyenv/versions/3.12.2/lib/python3.12/site-packages/streamlit/user_info.py", line 70, in getattr return _get_user_info()[key]


KeyError: 'is_logged_in'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/usertest/.pyenv/versions/3.12.2/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
    result = func()
             ^^^^^^
  File "/Users/usertest/.pyenv/versions/3.12.2/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 590, in code_to_exec
    exec(code, module.__dict__)
  File "/Users/usertest/Library/Mobile Documents/com~apple~CloudDocs/dev/python/wallstreet-client/getStockInfo-streamlit/stauthlib/app.py", line 7, in <module>
    st.write("Is user logged in?", st.experimental_user.is_logged_in())
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/usertest/.pyenv/versions/3.12.2/lib/python3.12/site-packages/streamlit/user_info.py", line 72, in __getattr__
    raise AttributeError
AttributeError

Thank you for your time and assistance in addressing this issue. I appreciate your help and look forward to any guidance or solutions you can provide.
kajarenc commented 1 day ago

Hello hello @maopareja !

thank you for opening this issue.

Most probably, this error was related to the old wheel file; I updated it to the newest version, where st.experimental_user.is_logged_in() was implemented.

Could you please try again?

Thank you!