flask.cli.NoAppException: While importing "application", an ImportError was raised: Traceback (most recent call last): File "c:\users\hp\appdata\local\programs\python\python38\lib\site-packages\flask\cli.py", line 240, in locate_app import(module_name) File "D:\pooja\edX web prog\python&flask\notes\application.py", line 8, in Session(app) File "c:\users\hp\appdata\local\programs\python\python38\lib\site-packages\flask_session-0.3.1-py3.8.egg\flask_session__init__.py", line 54, in init self.init_app(app) File "c:\users\hp\appdata\local\programs\python\python38\lib\site-packages\flask_session-0.3.1-py3.8.egg\flask_session__init__.py", line 61, in init_app app.session_interface = self._get_interface(app) File "c:\users\hp\appdata\local\programs\python\python38\lib\site-packages\flask_session-0.3.1-py3.8.egg\flask_session__init__.py", line 90, in _get_interface session_interface = FileSystemSessionInterface( File "c:\users\hp\appdata\local\programs\python\python38\lib\site-packages\flask_session-0.3.1-py3.8.egg\flask_session\sessions.py", line 313, in init from werkzeug.contrib.cache import FileSystemCache ModuleNotFoundError: No module named 'werkzeug.contrib'

  • It seems to be a flask thing. Potential solution in this reddit post Or this post on Ed Discussion – DinoCoderSaurus May 3 '20 at 21:41
  • In this line os.getenv("DATABASE_URL"). you should remove os.getenv and paste either postgres db url or local host url . Make sure virtual env is on and FLASK_APP= application.py .i hope ur program will run. – Nitin Garg May 7 '20 at 6:07

You must log in to answer this question.

Browse other questions tagged .