Answer the question
In order to leave comments, you need to log in
How to do import ModuleNotFoundError: No module named 'models'?
I have a site on flask, everything works fine on local, but I put the site on (terrible hosting) timeweb, after that it stopped seeing the models.py module index.wsgi models.py
files
in
one
folder like this I import into index.wsgi from models import UserModel,db,login mod_wsgi
error code
(pid=93029): Target WSGI script '/home/c/cm00339/careforme/public_html/index.wsgi' cannot be loaded as Python module.
mod_wsgi (pid=93029): Exception occurred processing WSGI script '/home/c/cm00339/careforme/public_html/index.wsgi'.
Traceback (most recent call last):
File "/home/c/cm00339/careforme/public_html/index.wsgi", line 15, in
from models import UserModel,db,login
ModuleNotFoundError: No module named 'models'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question