Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not locate a Flask application #7707

Closed
3 tasks done
ralsouza opened this issue Jun 13, 2019 · 13 comments
Closed
3 tasks done

Could not locate a Flask application #7707

ralsouza opened this issue Jun 13, 2019 · 13 comments
Labels
!deprecated-label:bug Deprecated label - Use #bug instead

Comments

@ralsouza
Copy link

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!

  • 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-label-bot issue-label-bot bot added the !deprecated-label:bug Deprecated label - Use #bug instead label Jun 13, 2019
@issue-label-bot
Copy link

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

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

@Haks1
Copy link

Haks1 commented Jun 14, 2019

Yup, I wrote about it yesterday, but the issue was closed #7689 (comment)

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)

@axcarlin
Copy link

axcarlin commented 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'

@Orchild
Copy link

Orchild commented Jun 14, 2019

I have the same problem

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

@dpgaspar
Copy link
Member

dpgaspar commented Jun 14, 2019

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

@ralsouza
Copy link
Author

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!

@dpgaspar
Copy link
Member

Great! Have a nice journey then ;)

@ryaneid
Copy link

ryaneid commented Jun 14, 2019

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

@mdZ01
Copy link

mdZ01 commented Jun 23, 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'

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

@littlepea
Copy link

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

@visakhmurukes
Copy link

I'm also getting the same issue

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

@mrchan123
Copy link

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

@haoyang1024
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead
Projects
None yet
Development

No branches or pull requests