Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple observes watching same path #919

Open
apatsekin opened this issue Sep 19, 2022 · 1 comment
Open

Multiple observes watching same path #919

apatsekin opened this issue Sep 19, 2022 · 1 comment

Comments

@apatsekin
Copy link

apatsekin commented Sep 19, 2022

According to this Issue, it should be fixed. However, I'm getting an error while trying to listen to the same folder from two different observers:

observer = Observer()
input_dir = "/tmp"
observer.schedule(PatternMatchingEventHandler(), input_dir, recursive=True)
observer.start()
observer2 = Observer()
observer2.schedule(PatternMatchingEventHandler(), input_dir, recursive=True)
observer2.start()

Triggers:

ERROR:Unhandled exception in FSEventsEmitter
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.10/site-packages/watchdog/observers/fsevents.py", line 315, in run
    _fsevents.add_watch(self, self.watch, self.events_callback, self.pathnames)
RuntimeError: Cannot add watch <ObservedWatch: path=/tmp, is_recursive=True> - it is already scheduled

python 3.10
macOS 12.6 M1 (arm64)
watchdog-2.1.9

@gavk34
Copy link

gavk34 commented Mar 15, 2024

Running with watchdog 4.0.0 and still seems to be an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants