Comments (3)
Should be fixed in #119, which includes a brief explanation of the problem.
Note, you're not actually deleting files here, but moving them to the Rubbish bin, hence the Modify(Name(From))
. If you did a proper delete with Shift + Delete
, you'd get a Remove(File)
event and this problem wouldn't happen.
from watchfiles.
Please provide:
- What OS you're on. (Looks like ubuntu, but I can't be sure)
- What events are being printed with
async for changes in awatch("some dir", debug=True)
Most likely, there lots of events triggered and watchfiles can't successfully clean them up - see:
Lines 67 to 77 in 1ac9d39
We already remove "modified" events if a "deleted" or "added" event happens in the same batch, but I don't want to alwasy remove "added" events if a "deleted" occurred in case the file really was added and deleted in the same batch (which is common with short lived files like some of those generated by vim).
But with debug and OS info, we might be able to do slightly more filtering.
What's weird in this example is that path-to-img1.bmp
is only added, which looks wrong, are you sure that's what you're seeing?
from watchfiles.
Hi!
Thanks for your reply.
Yes, I am on ubuntu (specifically 20.04.1).
I reran the experiment with debug=True
and these are the following logs:
raw-event: Event { kind: Modify(Name(From)), paths: ["path-to-img0.bmp"], attr:tracker: Some(7750), attr:flag: None, attr:info: None, attr:source: None }
raw-event: Event { kind: Modify(Name(From)), paths: ["path-to-img1.bmp"], attr:tracker: Some(7752), attr:flag: None, attr:info: None, attr:source: None }
raw-event: Event { kind: Modify(Name(From)), paths: ["path-to-img2.bmp"], attr:tracker: Some(7754), attr:flag: None, attr:info: None, attr:source: None }
raw-event: Event { kind: Modify(Name(From)), paths: ["path-to-img3.bmp"], attr:tracker: Some(7756), attr:flag: None, attr:info: None, attr:source: None }
raw-event: Event { kind: Modify(Name(From)), paths: ["path-to-img4.bmp"], attr:tracker: Some(7758), attr:flag: None, attr:info: None, attr:source: None }
Change.deleted path-to-img2.bmp
Change.added path-to-img1.bmp
Change.added path-to-img3.bmp
Change.deleted path-to-img0.bmp
Change.deleted path-to-img4.bmp
And yes, I am only seeing the addition for path-to-img1.bmp
, and interestingly the inconsistencies are kinda deterministic, and seem to always arise in path-to-img1.bmp
& path-to-img3.bmp
.
from watchfiles.
Related Issues (20)
- install trouble on SUSE11SP4: ERROR: Failed building wheel for maturin HOT 1
- Please keep a changelog HOT 1
- tests/test_watch.py::test_awatch_interrupt_raise is failing with anyio>=4 HOT 8
- .pyd ignored pattern is added back by PythonFilter.extensions HOT 1
- Problem installing on raspberry pi HOT 6
- Signal timeout does not propagate HOT 2
- awatch on a file on Linux trigger delete event HOT 4
- Please make a new release using pyo3 0.20.3 HOT 9
- Testsuite hangs on test_ignore_permission_denied on Debian i386 HOT 1
- Ignore error_handler errors under ignore_permission_denied = True? HOT 1
- Appends to an existing file get reported as `Change.added` HOT 1
- Release wheels for Python 3.13 HOT 3
- [Question] Possible to run multiple watch processes at once? HOT 1
- _rust_notify.WatchfilesRustInternalError: error in underlying watcher: IO error for operation on <python path>: No such file or directory (os error 2) HOT 16
- Unreasonable return HOT 1
- Ability to exclude certain directories from being watched HOT 1
- Doc link is broken HOT 3
- force_polling and ignore_permission_denied are not working together HOT 2
- Docs say python version supported is 3.10 still HOT 2
- Build fails without exporting HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watchfiles.