240 questions
Score of 1
0 answers
60 views
Why is watchdog event-handler trying to open every new file?
The simple directory-watching script is below:
import logging
import sys
import time
from watchdog.events import FileSystemEventHandler
from watchdog.observers import Observer
class MyEventHandler(...
Score of 0
1 answer
114 views
python watchdog output repeated logs when event happen
I am trying to monitor a folder using watchdog, the problem is I dont understand why watchdog observer output multiple logs when one event happens. The code I used is shown below, it is a very basic ...
Score of 0
1 answer
196 views
Watch for file changes and send the data through websocket [duplicate]
I have an endpoint in my python fast api and whenver the frontend connects to it, I want to listen for changes on a specific file stored in the temporary directory of the system. I am using watch dog, ...
Score of 1
0 answers
54 views
Watchdog: Change Schedule after start
I'm attempting to write a StackStorm Sensor that leverages Watchdog for its file watching capabilities. There is a builtin sensor, but it doesn't provide the capabilities that I'm looking for. However,...
Score of 1
0 answers
170 views
Python Watchdog Observer Triggering Function Twice on Directory Changes
I am using the watchdog module in python to monitor a directory for any changes (like adding or deleting files). I've set up an observer and and event handler to trigger a function whenever a change ...
Score of 0
1 answer
601 views
Trying to use watchdog/watchmedo on a Python/gRPC service: changes detected, code doesn't refresh
I'm building a gRPC Python app and tried to use watchdog with the watchmedo extension to listen for code changes and reload, like it is described in this question.
When the server is loaded and I make ...
Score of 0
1 answer
115 views
How to flush/reset the backlog of a python observer and PatternMatchingEventHandler when lots of changes happen in close succession?
I'm using a python PatternMatchingEventHandler watchdog to call a function each time a file is created (using self.on_created) within a watched directory tree. Minimal code example below. The function ...
Score of 0
1 answer
152 views
Convert Files Async by using ProcessPoolExecutor
I have this code that I am using to convert doc files to pdf, but I feel like it is not doing the correct job. I want this code to be able to handle as many files as possible at the same time when I ...
Score of 0
0 answers
193 views
Multithreading or Async file handling with Python
i have created a script which catches files in a folder and does conversion operation (from word to pdf) and it creates folders based on their file names and places them in there. However, problem is ...
Score of 0
0 answers
443 views
Run Python Script based on Watchdog once files in folder
I would like run my python script once a file in a certain folder is modified. To do this, I chose Watchdog.
First, I created an own project folder on my local machine and created and activated a venv....
Score of 0
0 answers
865 views
Python App with Watchdog Observer in Docker Container Throws FileNotFoundError
I developed a tiny python app to constantly run -> utilizing the watchdog package's capabilities of checking for events. When I drop an event in one folder on my desktop, I want to subsequently ...
Score of 0
1 answer
211 views
Refreshing layout in multi page Dash app due to watchdog file event
I have a multi page Dash app.
app.py:
app = dash.Dash(__name__, use_pages=True, suppress_callback_exceptions=True)
...
I then have a page:
pages/resources.py:
dash.register_page(__name__, order=4, ...
Score of 1
1 answer
304 views
The Watchdog library does not work long-term
I have a python script that uses watchdog library to monitor a folder on the server and when a file is created it does something with it.
The script runs as a service with nssm, and it basically works ...
Score of 0
1 answer
78 views
Run the python script in a thread when a new file is created in a folder
I am using watchdog to monitor a folder and running my script to convert pcap files to csv as soon as new file is created in that folder,However I am able to do that but I want to run my function in ...
Score of 0
0 answers
137 views
Messages not sent to RabbitMQ when new files are added in a directory
I have the following code that is used in a Kubernetes pod:
import pika
import time
import os
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
class ...