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

FLASK_APP create-admin not working #8886

Closed
Amogh-Balachandra5 opened this issue Dec 23, 2019 · 8 comments
Closed

FLASK_APP create-admin not working #8886

Amogh-Balachandra5 opened this issue Dec 23, 2019 · 8 comments
Labels

Comments

@Amogh-Balachandra5
Copy link

@Amogh-Balachandra5 Amogh-Balachandra5 commented Dec 23, 2019

A clear and concise description of what the bug is.

Expected results

what you expected to happen.

Actual results

what actually happens.

Screenshots

If applicable, add screenshots to help explain your problem.

How to reproduce the bug

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

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

Add any other context about the problem here.

@issue-label-bot

This comment has been minimized.

Copy link

@issue-label-bot issue-label-bot bot commented Dec 23, 2019

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

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

@issue-label-bot issue-label-bot bot added the #bug label Dec 23, 2019
@kuckjwi0928

This comment has been minimized.

Copy link
Contributor

@kuckjwi0928 kuckjwi0928 commented Dec 23, 2019

Could you attach the error log?

@Amogh-Balachandra5

This comment has been minimized.

Copy link
Author

@Amogh-Balachandra5 Amogh-Balachandra5 commented Dec 23, 2019

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.

@Amogh-Balachandra5

This comment has been minimized.

Copy link
Author

@Amogh-Balachandra5 Amogh-Balachandra5 commented Dec 23, 2019

I have also set the environment variable
as below
export FLASK_APP=/WebSphere/apache-superset-0.35.1/superset/

where folder superset contains

image

@dpgaspar

This comment has been minimized.

Copy link
Contributor

@dpgaspar dpgaspar commented Dec 23, 2019

Hi @Amogh-Balachandra5,

Please follow install instruction in detail: https://superset.apache.org/installation.html#installation-configuration

If the problem persists, post all your commands and output, thank you

@Amogh-Balachandra5

This comment has been minimized.

Copy link
Author

@Amogh-Balachandra5 Amogh-Balachandra5 commented Dec 23, 2019

Hi Daniel,

Below are the steps i have followed post installation

Step 1 : sudo superset db upgrade

/usr/local/lib/python3.7/site-packages/SQLAlchemy-1.3.8-py3.7-linux-x86_64.egg/sqlalchemy/sql/functions.py:67: SAWarning: The GenericFunction 'array_agg' is already registered and is going to be overriden.
"is going to be overriden.".format(identifier)
2019-12-23 13:39:11,411:INFO:root:logging was configured successfully
2019-12-23 13:39:11,526:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.

Step 2 : sudo flask fab create-admin

Username [admin]: admin
User first name [admin]: admin
User last name [user]: admin
Email [admin@fab.org]: amogh.balachandra@dikshatech.com
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.

@dpgaspar

This comment has been minimized.

Copy link
Contributor

@dpgaspar dpgaspar commented Dec 23, 2019

Really go trough all the steps, install the dependencies, create a virtualenv, and don't use sudo

@Amogh-Balachandra5

This comment has been minimized.

Copy link
Author

@Amogh-Balachandra5 Amogh-Balachandra5 commented Dec 23, 2019

I have found the solution instead of running
sudo flask fab create-admin

i have ran below and everything worked fine

sudo fabmanager create-admin --app superset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.