Error running app when using snowflake tables

I published an app in streamlit cloud, I can display the first page, but when I go to the second page where I have snowflake connection, I get: Error running app.

Can you share your repo so we can see your code and environment configuration?

HichamZghari/StreamlitApp (github.com)

Streamlit Cloud won’t be able to use both environment.yml and requirements.txt; it just uses the first one and stops. Since environment.yml is incomplete, you should delete it and just use requirements.txt to install Python packages.

I see that packages.txt is currently empty. So you can delete this too unless you need to install some dependency that isn’t a Python package.

After you delete environment.yml and packages.txt, reboot your app. If you still have an error, please look in the app’s logs to share the error message. (While viewing your deployed app at your_subdomain.streamlit.app, click on Manage App in the lower right hand corner to see the logs.)

I did that, but I’m still getting the same error (with no logs errors)

Are you handling any large files? There is a resource limit of 1GB. If you are hitting that, your app could be crashing with less clear indication.

If you are confident you are not using more than 1GB of memory or storage, can you paste what you see in the logs just to see what it shows?

Yes, files are under 1GB. Here is the link of the app: https://hichamzghari-streamlitapp-main-page-uw6u34.streamlit.app/

Remember to think about the size of the data you are downloading from your connection. That counts against the resource limit as well. Are you able to run your app locally, or does that crash, too? If it also crashes locally, maybe try running the pages separately to eliminate other factors. Since experimental_connection is new, I’d try to test that independently, too.

I won’t be able to see the logs myself with your app link. What I’m wanting to see is all the activity from the environment creation and package installation to see if there is any relevant information buried in there. If you could reboot, go to page 2 to crash it, then copy the entire log I can see how the environment resolved.

Even better, if you know the app is crashing on page 2 specifically, you can also add print statements throughout that page to help track if it’s crashing before or after the imports happen, and before or after reading in any data. The print statements will show up in the log.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.