I'm getting a ModuleNotFoundError while running my flask app with this dir structure:
project
| app
| __init__.py
| urls.py
| views.py
| __main__.py
In the project dir, while running python3 .
, I'm getting a
File "./app/__init__.py", line 4, in <module>
import urls
ModuleNotFoundError: No module named 'urls'
The content of __init__.py
is
#!/usr/bin/env python3
import logging
import flask_cors
import urls
from views import flask_app
log = logging.getLogger("werkzeug")
log.disabled = True
flask_cors.CORS(flask_app)
def run(host, port):
flask_app.run(host=host, port=port)
The code is a little big so this is the link to it.