When using the switch page function locally there is no problem and the app works normally, however after deploying the app, i get an attribute error saying: module ‘streamlit’ has no attribute ‘switch_page’. The streamlit version being used is 1.25.0 and python version is 3.19. Pls help
switch_page
was added in version 1.30.
Ohh, thank you so much.
Hi,
I still have the same issue with streamlit version 1.42. It works locally but when running it from Snowflake UI, it shows:
AttributeError: module ‘streamlit’ has no attribute ‘switch_page’
Traceback:
```
File “/usr/lib/python_udf/36f0f4adca10c7ea0ba93de9a0cd95beb9f5e4dfffea9a271ce72249d54d8671/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 565, in _run_script
- exec(code, module.dict)File “/tmp/appRoot/main_page.py”, line 49, in *
- st.switch_page(“pages/page1.py”)*
```
Any help on this will be appreciated. Thanks
I don’t think you are using streamlit 1.42 in snowflake.
This is confusing. Accrding to the docs, snowflake supports streamlit up to 1.35.0 (and 1.39.0 in preview). Or maybe I am misunderstanding snowflake products. Anyway, I would double check by adding st.write(st.__version__)
at the beginning of your application.
On the other hand, there seems to be some limitations to multipage apps in snowflake. I won’t claim to understand them, but they may be related to your issue.