Cawinchan / Streamlit-Multi-Page-Stock-Dashboard

Use this to create your own stock tracker dashboard
9 stars 5 forks source link

session_id = get_report_ctx().session_id AttributeError: 'NoneType' object has no attribute 'session_id' #1

Open foxxcrypto opened 3 years ago

foxxcrypto commented 3 years ago

Hi, i am trying your code but i get the following error:

"Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm Community Edition 2020.3.5\plugins\python-ce\helpers\pydev\pydevd.py", line 1477, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "C:\Program Files\JetBrains\PyCharm Community Edition 2020.3.5\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "C:/DEVELOP/PYTHON/streamlit-dashboards/Streamlit-Multi-Page-Stock-Dashboard-master/main_stock_app.py", line 183, in main("testing_dashboard") File "C:/DEVELOP/PYTHON/streamlit-dashboards/Streamlit-Multi-Page-Stock-Dashboard-master/main_stock_app.py", line 65, in main state = _get_state() File "C:/DEVELOP/PYTHON/streamlit-dashboards/Streamlit-Multi-Page-Stock-Dashboard-master/main_stock_app.py", line 174, in _get_state session = _get_session() File "C:/DEVELOP/PYTHON/streamlit-dashboards/Streamlit-Multi-Page-Stock-Dashboard-master/main_stock_app.py", line 164, in _get_session session_id = get_report_ctx().session_id AttributeError: 'NoneType' object has no attribute 'session_id' main_stock_app_error

Cawinchan commented 3 years ago

Hello @foxxcrypto! You have to use $ _streamlit run main_stockapp.py in order to run the streamlit app, you can't use python or run the python file in your IDE

image