kallehallden / desktop_cleaner Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Traceback (most recent call last):
File "cleandesk.py", line 8, in
from desktop_cleaner.EventHandler import EventHandler
ModuleNotFoundError: No module named 'desktop_cleaner'
Cloned recent project
Stuff like '.mp3' : "/Users/kalle/Desktop/kalle/Media/Audio"
should be made using a constant variables containing these common paths. It might be simply a code-defined value, might be a command-line argument. Also, you could use subprocess
to find out the path to some directories of the user on different OS's.
According to https://stackoverflow.com/questions/4028904/how-to-get-the-home-directory-in-python, you could do something like:
from pathlib import Path
home = str(Path.home())
This happens when copying a large file. Since watchdog already detected a few bytes coming into the watch_path, the command to transfer that file was triggered, but since the copying process was not yet finished by that time, it returned this error and the program comes to a halt. Weirdly, if I terminate the program and run it again, and copy a small file this time, it works as expected transferring the small file to the destination folder but the large file I transferred earlier is transferred as well.
With this in mind, can you help me fix this by telling the program to wait for the copying process, and then once it is finished, it'll do its thing and transfer the files into the destination folder? Thank you!
I have spent a few hours working on this and I cannot figure it out.
I followed up with the issue fixes and now I get "Pylance(reportMissingImports)
`from watchdog.observers import Observer
from eventhandler import EventHandler
if name == 'main':
watch_path = Path.home() / 'Desktop'`
I also have the same issue in the EventHandler.py for import extensions.
The process cannot access the file because it is being used by another process.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.