Inotify_add_watch error when deleting in Qt but not command line

Heads up! You've already completed this tutorial.

Cody_Jackson | 2021-05-14 19:59:29 UTC | #1

I have a GUI that allows the user to delete items from a tree view that is also a file explorer (based on the tutorial from the Create GUI Applications book).

The user is able to create a project and various assets within that project. If the assets and project are compiled, using make, and then the project is deleted, I receive the following error:

python
inotify_add_watch("/home/user/User_OpenCPI_Projects/Blah") failed: "No such file or directory"
inotify_add_watch("/home/user/User_OpenCPI_Projects/Blah/components") failed: "No such file or directory"
inotify_add_watch("/home/user/User_OpenCPI_Projects/Blah/components/Gross") failed: "No such file or directory"

However, when the same process if performed via command line, the inotify errors do not appear, leading me to believe the main problem is in how Qt handles the deletion.

Any thoughts?


Create GUI Applications with Python & Qt5 by Martin Fitzpatrick — (PyQt5 Edition) The hands-on guide to making apps with Python — Over 10,000 copies sold!

More info Get the book

Well done, you've finished this tutorial! Mark As Complete
[[ user.completed.length ]] completed [[ user.streak+1 ]] day streak

Inotify_add_watch error when deleting in Qt but not command line was written by Martin Fitzpatrick .

Martin Fitzpatrick has been developing Python/Qt apps for 8 years. Building desktop applications to make data-analysis tools more user-friendly, Python was the obvious choice. Starting with Tk, later moving to wxWidgets and finally adopting PyQt.