Streamlit doesnt work in production due to deprecated global.disableWatchdogWarning

My streamlit app works locally but when I deploy it in production on Posit connect, it throws the following error:

2024/07/26 9:52:53 PM: streamlit.errors.DeprecationError:
2024/07/26 9:52:53 PM: ════════════════════════════════════════════════
2024/07/26 9:52:53 PM: global.disableWatchdogWarning IS NO LONGER SUPPORTED.
2024/07/26 9:52:53 PM:
2024/07/26 9:52:53 PM: global.disableWatchdogWarning has been deprecated and will be removed in a future version.
2024/07/26 9:52:53 PM:
2024/07/26 9:52:53 PM: Please update command-line argument or environment variable.
2024/07/26 9:52:53 PM: ════════════════════════════════════════════════

This seems to be a bug in streamlit due to some leftover function stated heregithub. I tried different versions of streamlit but that didnt fix my issue. I dont have terminal access on Posit so I have to define an environment variable before deployment for this. The github issues created on the streamlit page didnt work.

On the latest version of streamlit, i get the following error:

Error: No such option: --global.disableWatchdogWarning (Possible options: --global.disableWidgetStateDuplicationWarning, --global.suppressDeprecationWarnings)

My streamlit version is 1.37.0 and python version is 3.9

1 Like

I’m facing the same exact issue with Python 3.9 and any Streamlit version >=1.36.0

Were you able to find a fix or workaround?