kmcgrady / streamlit-autorefresh

An autorefresh component for Streamlit apps
MIT License
176 stars 16 forks source link

Streamlit app breaks when deploying using st_autorefresh #3

Closed josecaloca closed 2 years ago

josecaloca commented 2 years ago

I use st_autorefresh for refreshing my app every 30 sec with a limit of 100 times as explained in the repository. It works nicely when the app is launched locally, however, when the app is deployed in streamlit it breaks and gives the following error:

error

The problem is directly with importing the library. After deleting the st_autorefresh related code, the app perfectly deploys on streamlit.io

from streamlit_autorefresh import st_autorefresh st_autorefresh(interval= 1 * 30 * 1000, key="app_refresh")

josecaloca commented 2 years ago

Problem solved by adding the library name to the requirements.txt It is important that all libraries used in the code are declared in correctly