(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 [[email protected]]: [email protected]
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'
@mapingsheng1025 fabmanger is deprecated, please use flask fab create-admin
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 [[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.
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"?
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'
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 [[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.
@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/.
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.
preks ~
$ source activate py3env
(py3env) preks ~
$ flask fab create-admin
Username [admin]: admin
User first name [admin]: admin
User last name [user]: admin
Email [[email protected]]: [email protected]
Password: admin
admin
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?
Most helpful comment
Depending on whether or not you're running the latest release or
master,FLASK_APPwill need to be different:master:FLASK_APP='superset.app:create_app()'0.35.x:FLASK_APP='superset'