superset failed to create admin user and reported error: error! User already exists user or attributeerror: ‘nonetype’ object has no attribute ‘auth_ Type ‘solution font>
Error description
After installing superset, it is found that the admin user cannot log in, execute flash Fab create admin
, and the following error is reported:
(superset) [layne@hadoop102 bin]$ flask fab create-admin
Username [admin]: layne
User first name [admin]:
User last name [user]:
Email [[email protected]]:
Password:
Repeat for confirmation:
logging was configured successfully
INFO:superset.utils.logging_configurator:logging was configured successfully
/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/flask_caching/__init__.py:202: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
"Flask-Caching: CACHE_TYPE is set to null, "
No PIL installation found
INFO:superset.utils.screenshots:No PIL installation found
Recognized Database Authentications.
Error! User already exists layne
Execute fabmanager create admin -- app superset
according to the online method, and the following error is reported:
(superset) [layne@hadoop102 bin]$ 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 <command>'
Username [admin]: layne
User first name [admin]:
User last name [user]:
Email [[email protected]]:
Password:
Repeat for confirmation:
Traceback (most recent call last):
File "/opt/module/miniconda3/envs/superset/bin/fabmanager", line 8, in <module>
sys.exit(cli())
File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/flask_appbuilder/console.py", line 422, in cli
cli_app()
File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/flask_appbuilder/console.py", line 137, in create_admin
auth_type.get(_appbuilder.sm.auth_type, "No Auth method")
AttributeError: 'NoneType' object has no attribute 'auth_type'
resolvent
Delete the superset.db database file and reinitialize the database
For example, my current Linux login user name is lane, and my superset.db file is in /home/Lane /. Superset/superset. DB
, delete the file:
(superset) [layne@hadoop102 ~]$ cd /home/layne/.superset/
(superset) [layne@hadoop102 .superset]$ rm -f superset.db
Then reinitialize the database:
(superset) [layne@hadoop102 ~]$ superset db upgrade
Create the admin user again and find that it can be created successfully:
(superset) [layne@hadoop102 ~]$ export FLASK_APP=superset
(superset) [layne@hadoop102 ~]$ flask fab create-admin
Username [admin]: layne
User first name [admin]:
User last name [user]:
Email [[email protected]]:
Password:
Repeat for confirmation:
logging was configured successfully
INFO:superset.utils.logging_configurator:logging was configured successfully
/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/flask_caching/__init__.py:202: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
"Flask-Caching: CACHE_TYPE is set to null, "
No PIL installation found
INFO:superset.utils.screenshots:No PIL installation found
Recognized Database Authentications.
Admin User layne created.
OK, it’s done!
Read More:
- Vscode cannot write user settings. Open user settings, clear errors or warnings, and then type again
- ValueError: The field admin.LogEntry.user was declared with a lazy reference to ‘MyApp.sysusers‘
- Add samba user prompt Failed to add entry for user.
- Add Samba user prompt failed to add entry for user
- User CF itemcf collaborative filtering algorithm based on user and item
- Error 1396 (HY000): Operation create user failed for ‘xxx’ @’xxx ‘
- [MySQL] error 1396 (HY000): Operation create user failed for ‘MySQL’ @’localhost ‘
- [solved] sql30082n security processing failed with reason “24” (“user name and / or password invalid”)
- Python flash project to obtain the request user IP address addr
- Failed to create Oracle Oracle home user solution appears in oracle12c installation
- Mongodb (version 3.2) create user error addUser is not a function
- phpstudy Error while setting value ‘STRICT_TRANS_TABLES, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION
- “Failed to find entry for user…” appears when Linux uses samba
- django.db.utils.IntegrityError: UNIQUE constraint failed: auth_user.username
- “Failed to find entry for user…” appears when Samba is used
- standard_init_linux.go:178: exec user process caused “no such file or directory”
- DOMException: play() failed because the user didn‘t interact with the document first
- python sqlite Error IntegrityError: UNIQUE constraint failed: table_area1.user_name
- Login failed for user ‘IIS APPPOOL\DefaultAppPool’
- ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘mysql’