If you’re creating a debugging post, please include the following info:
- Are you running your app locally or is it deployed? Locally
- Share the full text of the error message (not a screenshot).
Traceback (most recent call last):
File "/Users/charles/Developer/Kraken/inksacio/src/inksacio/apps/data_observability/freshness/app.py", line 8, in <module>
navigation.set_navigation()
File "/Users/charles/Developer/Kraken/inksacio/src/inksacio/apps/data_observability/freshness/navigation.py", line 8, in set_navigation
pg = st.navigation(
File "/Users/charles/.local/share/virtualenvs/freshness-5iWkCm3l/lib/python3.10/site-packages/streamlit/runtime/metrics_util.py", line 408, in wrapped_func
result = non_optional_func(*args, **kwargs)
File "/Users/charles/.local/share/virtualenvs/freshness-5iWkCm3l/lib/python3.10/site-packages/streamlit/commands/navigation.py", line 178, in navigation
if page._default:
AttributeError: 'StreamlitPage' object has no attribute '_default'
- Share the Streamlit and Python versions.
Python 3.10.13
streamlit = “==1.37.1”
Hello ! I am moving my app to the new st.navigation and on normal invocation it is working fine. When I try to schedule it though, I get AttributeError: ‘StreamlitPage’ object has no attribute ‘_default’
The scheduling is done by calling os.system(f"python {app_file} {cache_cli_arg}") from one of the pages while the app.py itself is just
import streamlit as st
from blabla import navigation
st.set_page_config(page_icon=":flag-jp:", layout="wide")
navigation.set_navigation()
which is just
pg = st.navigation(pages,)
pg.run()
Any idea how I can fix this ? Do i need to set a default page somewhere ?