question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not locate a Flask application

See original GitHub issue

After running the image with Docker and entering the admin user information the error below is displayed.

Expected results

Confirm admin user creation and start Superset.

Actual results

After entering admin user data, the error is displayed.

+ '[' 1 -ne 0 ']'
+ exec ./docker-init.sh
+ flask fab create-admin
Username [admin]: admin
User first name [admin]: admin
User last name [user]: user 
Email [admin@fab.org]: admin@fab.org
Password: 
Repeat for confirmation: 
Usage: flask fab create-admin [OPTIONS]

Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory.

Screenshots

NA.

How to reproduce the bug

  1. git clone https://github.com/apache/incubator-superset/
  2. cd incubator-superset/contrib/docker
  3. docker-compose run --rm superset ./docker-init.sh

Environment

(please complete the following information):

  • superset version: superset version
  • python version: python --version
  • node.js version: node -v
  • npm version: npm -v

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven’t found one similar.

Additional context

Ubuntu 19.04

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
axcarlincommented, Jun 14, 2019

Downloaded the package a couple of minutes ago, same issue after completing the admin user credentials prompts

Was unable to import superset Error: No module named 'flask_talisman'

3reactions
mrchan123commented, Oct 19, 2019

fabmanager create-admin --app superset until this is fixed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Could not locate a Flask application. #1881 - GitHub
If you are, generally the solution to that error is to make sure you've explicitly set the FLASK_APP environment variable to the correct...
Read more >
Hello guys i am getting an Error: Could not locate a flask ...
It's something weird that's for sure. I can make a new folder, create a new venv, install flask and start an app and...
Read more >
Solved: Cannot run Flask (Python version 3.9.7) - Neo4j - 58078
Usage: flask run [OPTIONS] Try 'flask run --help' for help. Error: Could not locate a Flask application. You did not provide the "FLASK_APP" ......
Read more >
Quickly Get Started With Flask - Medium
This is a quick introduction to Flask to get you started. Minimal Requirements ... Error: Could not locate a Flask application.
Read more >
Flask app getting error of "could not locate flask ... - YouTube
python: Flask app getting error of " could not locate flask application. .....FLASK_APP environment varia...Thanks for taking the time to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found