blavejr / OrganiseDesktop

Python script that cleans up a messy desktop
MIT License
91 stars 78 forks source link

ModuleNotFoundError: No module named '__main__.cronController'; '__main__' is not a package #92

Open mtshikomba opened 3 years ago

mtshikomba commented 3 years ago

I've installed all the requirements as mentioned but I keep getting this error. Not sure what the problem is PLEASE HELP.

`D:\OrganiseDesktop-master\OrganiseDesktop-master (env) λ python organise_desktop\Clean.py Traceback (most recent call last): File "organise_desktop\Clean.py", line 4, in from .cronController import schedule_end, schedule_start ModuleNotFoundError: No module named 'main.cronController'; 'main' is not a package

D:\OrganiseDesktop-master\OrganiseDesktop-master (env) λ cd organise_desktop\

D:\OrganiseDesktop-master\OrganiseDesktop-master\organise_desktop (env) λ python Clean.py Traceback (most recent call last): File "Clean.py", line 4, in from .cronController import schedule_end, schedule_start ModuleNotFoundError: No module named 'main.cronController'; 'main' is not a package `

blavejr commented 3 years ago

Hey @dev-mtshikomba, could you let me know which OS you are running on?

KokoseiJ commented 3 years ago

I'd assume Windows, judging from his CWD.

While I currently can't access my PC for, 2 more days, I think your environment could be the culprit. Are you sure that you have cronController.py in the same folder where Clean.py is?

EDIT: While you're at it, could you please try python3 -m organise_desktop and see if it works?

shashank1623 commented 2 years ago

The python -m organise_desktop cmd works to solve the problem of relative import