Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ModuleNotFoundError
#1
So the path is:

Output:
secure-erp\ controller\ hr_controller.py main_controller.py model\ hr\ hr.py util.py erp.py
In file hr.py i need to import a function from util.py. So the code is
from model import util
but it gives me an error
Error:
"ModuleNotFoundError: No module named 'model'"
I've tried to add __init__.py file, but it doesn't work.

What's the funniest? When in file erp.py i wrote a line:
from controller import main_controller
everything works perfect.

Please HELP!! :(
Reply


Messages In This Thread
ModuleNotFoundError - by Kjaglewicz - Aug-22-2022, 10:24 PM
RE: ModuleNotFoundError - by rob101 - Aug-23-2022, 01:20 AM
RE: ModuleNotFoundError - by Kjaglewicz - Aug-23-2022, 01:23 AM
RE: ModuleNotFoundError - by rob101 - Aug-23-2022, 01:36 AM
RE: ModuleNotFoundError - by rob101 - Aug-23-2022, 01:47 AM
RE: ModuleNotFoundError - by snippsat - Aug-23-2022, 11:39 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020