Hi, I have recently upgraded from version 1.44.0 to 1.46.0.
When I run my Streamlit app locally, I encounter the following RuntimeError in the terminal, although the app is not crashing. ChatGPT suggests:
“The error originates from the watchdog
package, which is commonly used for monitoring file system events. The dispatch_events
method calls a handler that processes events, and it seems this handler is trying to modify a dictionary while iterating over it.”
What should I do about this? Is it a bug in the new update?
Exception in thread Thread-1:
Traceback (most recent call last):
File "threading.py", line 1041, in _bootstrap_inner
self.run()
File "watchdog/observers/api.py", line 213, in run
self.dispatch_events(self.event_queue)
File "watchdog/observers/api.py", line 391, in dispatch_events
handler.dispatch(event)
File "watchdog/events.py", line 217, in dispatch
getattr(self, f"on_{event.event_type}")(event)
File "streamlit/watcher/event_based_path_watcher.py", line 417, in on_modified
self.handle_path_change_event(event)
File "streamlit/watcher/event_based_path_watcher.py", line 368, in handle_path_change_event
for path, info in self._watched_paths.items():
RuntimeError: dictionary changed size during iteration