If you’re creating a debugging post, please include the following info:
- Share the link to the public app (deployed on Community Cloud). https://melaniessmoothies-3swhxpeis4lgr3mxhy4nit.streamlit.app/
- Share the link to your app’s public GitHub repository (including a [requirements file]Melanies_smoothies/streamlit_app.py at main · Viswa2209/Melanies_smoothies · GitHub
- Share the full text of the error message (not a screenshot).
ModuleNotFoundError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).
Traceback:
File “/mount/src/melanies_smoothies/streamlit_app.py”, line 3, in
from snowflake.snowpark.functions import col
ModuleNotFoundError: No module named 'snowflake'
2025-05-26 17:10:26.809 503 GET /script-health-check (127.0.0.1) 131.25ms
2025-05-26 17:10:31.673 Uncaught app execution
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 121, in exec_func_with_error_handling
result = func()
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 645, in code_to_exec
exec(code, module.__dict__)
File "/mount/src/melanies_smoothies/streamlit_app.py", line 3, in <module>
from snowflake.snowpark.functions import col
5. Share the Streamlit and Python versions.
streamlit_app.py:#Import python packages
import streamlit as st
from snowflake.snowpark.functions import col
helpful_links = [
"https://docs.streamlit.io",
"https://docs.snowflake.com/en/developer-guide/streamlit/about-streamlit",
"https://github.com/Snowflake-Labs/snowflake-demo-streamlit",
"https://docs.snowflake.com/en/release-notes/streamlit-in-snowflake"
]
# Write directly to the app
st.title("🥤Customize Your Smoothie!🥤")
st.write("Choose the fruits you want in your custom Smoothie!")
name_on_order = st.text_input('Name on Smoothie:')
st.write('The name on your Smoothie will be:', name_on_order)
cnx =st.connection("snowflake")
session = cnx.session()
my_dataframe = session.table("smoothies.public.fruit_options").select(col('FRUIT_NAME'))
#st.dataframe(data=my_dataframe, use_container_width=True)
ingredients_list= st.multiselect(
"Choose up to 5 ingredients:",my_dataframe,max_selections=6
)
if ingredients_list:
#st.write(ingredients_list)
#st.text(ingredients_list)
ingredients_string = ''
for fruit_chosen in ingredients_list:
ingredients_string +=fruit_chosen + ' '
#st.write(ingredients_string)
my_insert_stmt = """ insert into smoothies.public.orders(ingredients,name_on_order)
values ('""" + ingredients_string + """','""" + name_on_order + """')"""
#st.write(my_insert_stmt)
time_to_insert = st.button('Submit Order')
if time_to_insert:
session.sql(my_insert_stmt).collect()
st.success(f'Your Smoothie is ordered, {name_on_order}!', icon="✅")
requirements.txt.:# requirements.txt
snowflake-snowpark-python
streamlit