superset icon indicating copy to clipboard operation
superset copied to clipboard

Could not locate a Flask application

Open ralsouza opened this issue 7 years ago • 13 comments

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 [[email protected]]: [email protected]
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!

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

Additional context

Ubuntu 19.04

ralsouza avatar Jun 13 '19 19:06 ralsouza

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.55. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Jun 13 '19 19:06 issue-label-bot[bot]

Yup, I wrote about it yesterday, but the issue was closed https://github.com/apache/incubator-superset/issues/7689#issuecomment-501470532

Also, if you try to change the create admin call in docker-init.sh:

I've tried with fabmanager create-admin --app superset and I got this error: "There is no appbuilder var on your package, you can use appbuilder parameter to config"

(I got also this same error if I try to compose on branch 0.30)

Haks1 avatar Jun 14 '19 00:06 Haks1

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'

axcarlin avatar Jun 14 '19 05:06 axcarlin

I have the same problem

Error: Failed to find Flask application or factory in module "app". Use "FLASK_APP=app:name to specify one.

Orchild avatar Jun 14 '19 06:06 Orchild

Hi,

This works: sudo docker-compose run -e FLASK_APP=superset:app --rm superset ./docker-init.sh

I'll submit a PR to solve it or on docker-init.sh or on README.md

dpgaspar avatar Jun 14 '19 08:06 dpgaspar

Hi,

This works: sudo docker-compose run -e FLASK_APP=superset:app --rm superset ./docker-init.sh

I'll submit a PR to solve it or on docker-init.sh or on README.md

It worked very well, thank you !!! Starting my journey on Superset!

ralsouza avatar Jun 14 '19 13:06 ralsouza

Great! Have a nice journey then ;)

dpgaspar avatar Jun 14 '19 14:06 dpgaspar

@dpgaspar I'm getting a new error when I run that jinja2.exceptions.TemplateNotFound: superset/base.html when I launch localhost

ryaneid avatar Jun 14 '19 17:06 ryaneid

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'

I had the exact same problem with the new version. Did you manage to fix it? Thank you!

mdZ01 avatar Jun 23 '19 16:06 mdZ01

I still have an issue with Was unable to import superset Error: No module named 'flask_talisman' and sudo docker-compose run -e FLASK_APP=superset:app --rm superset ./docker-init.sh doesn't help

littlepea avatar Sep 30 '19 02:09 littlepea

I'm also getting the same issue

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

visakhmurukes avatar Oct 16 '19 08:10 visakhmurukes

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

mrchan123 avatar Oct 19 '19 00:10 mrchan123

Hi,

This works: sudo docker-compose run -e FLASK_APP=superset:app --rm superset ./docker-init.sh

I'll submit a PR to solve it or on docker-init.sh or on README.md

How should I use this command on Windows

haoyang1024 avatar Jun 08 '23 09:06 haoyang1024