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

fabmanager create-admin --app superset #9143

Closed
mapingsheng1025 opened this issue Feb 14, 2020 · 7 comments
Closed

fabmanager create-admin --app superset #9143

mapingsheng1025 opened this issue Feb 14, 2020 · 7 comments
Labels
inactive Inactive for >= 30 days

Comments

@mapingsheng1025
Copy link

(superset) [root@node04 superset]# fabmanager create-admin --app superset
fabmanager is going to be deprecated in 2.2.X, you can use the same commands on the improved 'flask fab '
Username [admin]: admin
User first name [admin]: admin
User last name [user]: admin
Email [admin@fab.org]: maning1025@163.com
Password:
Repeat for confirmation:
Traceback (most recent call last):
File "/opt/superset/bin/fabmanager", line 8, in
sys.exit(cli())
File "/opt/superset/lib/python3.8/site-packages/flask_appbuilder/console.py", line 417, in cli
cli_app()
File "/opt/superset/lib/python3.8/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/opt/superset/lib/python3.8/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/opt/superset/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/superset/lib/python3.8/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/superset/lib/python3.8/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/opt/superset/lib/python3.8/site-packages/flask_appbuilder/console.py", line 132, in create_admin
auth_type.get(_appbuilder.sm.auth_type, "No Auth method")
AttributeError: 'NoneType' object has no attribute 'auth_type'

@nytai
Copy link
Member

nytai commented Feb 14, 2020

@mapingsheng1025 fabmanger is deprecated, please use flask fab create-admin

@mapingsheng1025
Copy link
Author

Thank you, but another problem arises

(superset) [root@node04 superset]# flask fab create-admin
Username [admin]: admin
User first name [admin]: admin
User last name [user]: superset
Email [admin@fab.org]: maning1025@163.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.

@peschu123
Copy link

documentation says:

Create an admin user (you will be prompted to set a username, first and last name before setting a password)

$ export FLASK_APP=superset
flask fab create-admin

I think you just missed the export of "FLASK_APP"?

@craig-rueda
Copy link
Member

Depending on whether or not you're running the latest release or master, FLASK_APP will need to be different:

master: FLASK_APP='superset.app:create_app()'
0.35.x: FLASK_APP='superset'

@Daletxt
Copy link

Daletxt commented Feb 27, 2020

Thank you, but another problem arises

(superset) [root@node04 superset]# flask fab create-admin
Username [admin]: admin
User first name [admin]: admin
User last name [user]: superset
Email [admin@fab.org]: maning1025@163.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.

@peschu123 is right, Linux, you need :export FLASK_APP=superset, If Windows10, we should cd .../superset/ , then: set FLASK_APP=app.py, not under .../superset/bin/.

@stale
Copy link

stale bot commented Apr 28, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Apr 28, 2020
@stale stale bot closed this as completed May 6, 2020
@ericfonsi
Copy link

preks ~
$ source activate py3env
(py3env) preks ~
$ flask fab create-admin
Username [admin]: admin
User first name [admin]: admin
User last name [user]: admin
Email [admin@fab.org]: admin@admin.admin
Password: admin
admin

abcg

I have installed apache superset in my virtual env. I ran the command 'superset db upgrade'
And set the flask app using 'export FLASK_APP=superset'
But when I try to create admin user, I'm not asked to repeat for confirmation, instead it waits for input and when I re-enter the password and hit enter, nothing happens. It again waits for input.

How can I fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive Inactive for >= 30 days
Projects
None yet
Development

No branches or pull requests

7 participants