Hello Streamlit Community,
My Streamlit app has been running smoothly on Streamlit Community Cloud until about 2 hours ago, when it suddenly stopped working.
I’ve tried running it locally and it’s still working fine, so I’m not sure why it’s failing in the cloud environment.
Has anyone else encountered a similar issue, or am I the only one?
1. Link to the Public App
2. requirements.txt
beautifulsoup4
Bio
google-generativeai
groq
instructor
librosa
mutagen
numpy<2.0
openai
protobuf
pydantic
pydub
python-dotenv
python_magic
regex
scikit-learn
silero_vad
soundfile
streamlit
streamlit-browser-engine
streamlit_shortcuts
structlog
torch
torchaudio
watchdog
-e ./streamlit-dictation-recorder
3. Full Error Message
Here’s the error message from the logs:
[21:29:19] 📦 Processed dependencies!
2025-01-10 21:29:24.960 Uncaught exception GET /_stcore/stream (127.0.0.1)
HTTPServerRequest(protocol='http', host='radiologyflow-alpha.streamlit.app', method='GET', uri='/_stcore/stream', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.10/site-packages/tornado/websocket.py", line 938, in _accept_connection
open_result = handler.open(*handler.open_args, **handler.open_kwargs)
File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/web/server/browser_websocket_handler.py", line 126, in open
self._session_id = self._runtime.connect_session(
File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/runtime/runtime.py", line 384, in connect_session
session_id = self._session_mgr.connect_session(
File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/runtime/websocket_session_manager.py", line 99, in connect_session
session = AppSession(
File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/runtime/app_session.py", line 133, in __init__
self._pages_manager = PagesManager(
File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/runtime/pages_manager.py", line 235, in __init__
self.pages_strategy = PagesManager.DefaultStrategy(self, **kwargs)
File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/runtime/pages_manager.py", line 73, in __init__
PagesStrategyV1.watch_pages_dir(pages_manager)
File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/runtime/pages_manager.py", line 61, in watch_pages_dir
watch_dir(
File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/watcher/path_watcher.py", line 155, in watch_dir
return _watch_path(
File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/watcher/path_watcher.py", line 126, in _watch_path
watcher_class(
File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/watcher/event_based_path_watcher.py", line 107, in __init__
path_watcher.watch_path(
File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/watcher/event_based_path_watcher.py", line 185, in watch_path
folder_handler.watch = self._observer.schedule(
File "/home/adminuser/venv/lib/python3.10/site-packages/watchdog/observers/api.py", line 312, in schedule
emitter.start()
File "/home/adminuser/venv/lib/python3.10/site-packages/watchdog/utils/__init__.py", line 75, in start
self.on_thread_start()
File "/home/adminuser/venv/lib/python3.10/site-packages/watchdog/observers/inotify.py", line 119, in on_thread_start
self._inotify = InotifyBuffer(path, recursive=self.watch.is_recursive, event_mask=event_mask)
File "/home/adminuser/venv/lib/python3.10/site-packages/watchdog/observers/inotify_buffer.py", line 30, in __init__
self._inotify = Inotify(path, recursive=recursive, event_mask=event_mask)
File "/home/adminuser/venv/lib/python3.10/site-packages/watchdog/observers/inotify_c.py", line 185, in __init__
self._add_dir_watch(path, event_mask, recursive=recursive)
File "/home/adminuser/venv/lib/python3.10/site-packages/watchdog/observers/inotify_c.py", line 404, in _add_dir_watch
self._add_watch(path, mask)
File "/home/adminuser/venv/lib/python3.10/site-packages/watchdog/observers/inotify_c.py", line 424, in _add_watch
Inotify._raise_error()
File "/home/adminuser/venv/lib/python3.10/site-packages/watchdog/observers/inotify_c.py", line 435, in _raise_error
raise OSError(errno.ENOSPC, "inotify watch limit reached")
OSError: [Errno 28] inotify watch limit reached
Exception ignored in: <function AppSession.__del__ at 0x797d58d76e60>
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/runtime/app_session.py", line 174, in __del__
self.shutdown()
File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/runtime/app_session.py", line 240, in shutdown
if self._state != AppSessionState.SHUTDOWN_REQUESTED:
AttributeError: 'AppSession' object has no attribute '_state'
/app/scripts/run-streamlit.sh: line 9: 2182 Segmentation fault sudo -E -u appuser /home/adminuser/venv/bin/streamlit "$@"
main
4. Streamlit and Python Versions
- Streamlit Version: 1.41.1
- Python Version: 3.12
Additional Context
The app runs on my computer without any problems, but it won’t run on Streamlit Community Cloud. I think the problem is probably to do with the Python version or a dependency conflict, because the segmentation fault happens when I run “sudo -E -u appuser /home/adminuser/venv/bin/streamlit”.
I have already tried:
- Restarting the app
- Switching to Python 10 (instead of 12) in Streamlit Cloud
- Testing locally (this works without issue!)
Any help with this would be great!