Skip to content

ImportError when trying to start flask app, but no stack trace printed #4351

@haimat

Description

@haimat

I am trying to set up a flask application on my new machine. First I checked out the sources from our server - I am pretty sure the application directory structure is correct, as we are using it exactly like this on other machines.

However, when I try to run the app on my new computer I get the following error:

$ FLASK_ENV="development" FLASK_APP="run.py" flask run
 * Serving Flask app 'run.py' (lazy loading)
 * Environment: development
 * Debug mode: on
Usage: flask run [OPTIONS]
Try 'flask run --help' for help.

Error: While importing 'run', an ImportError was raised.

Problem is: No more output is printed, in particular no stack trace. So I don't know what exactly the problem is. How can I tell flask to print the stack trace?

Environment:

  • Python version: 3.8.10
  • Flask version: 2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions