Forums

ModuleNotFoundError: No module named 'app'

Hi !

I'm a beginner and I'm trying to develop a website. But I'm having troubles.

Here's the error message :

ModuleNotFoundError: No module named 'app'

I think I've correctly configured my WSGI Configuration file :

import sys

# add your project directory to the sys.path
project_home = '/home/elthib/mysite/site_bds/'
if project_home not in sys.path:
    sys.path = [project_home] + sys.path

# import flask app but need to call it "application" for WSGI to work
from app import app as application  # noqa

I cloned my GitHub repository : https://i.postimg.cc/4yWyY4gZ/files.png

From the error logs that we can see, it looks like you may have fixed this issue and moved on to a new one -- you're now getting an error because it can't find a file. This help page explains the causes and solutions for that kind of error.

But I don't know which file he can't find...

The error message tells you -- I won't copy/paste it in here, because that would potentially make your private data public, but if you look at the end of the line starting "FileNotFoundError: [Errno 2] No such file or directory:", you'll see the filename. If you follow the instructions on the help page I linked to above, you can fix the problem.

Thanks a lot ! Everything is working now !

Glad to hear that.