【已解决】superset创建admin用户失败:Error! User already exists user 或 AttributeError: ‘NoneType‘
superset创建admin用户失败报错:Error! User already exists user 或者 AttributeError: ‘NoneType’ object has no attribute ‘auth_type’ 解决方法
错误描述
安装superset后发现admin用户登录不上去,执行flask fab create-admin
报如下错误:
(superset) [layne@hadoop102 bin]$ flask fab create-admin
Username [admin]: layne
User first name [admin]:
User last name [user]:
Email [admin@fab.org]:
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
按照网上的方法执行fabmanager create-admin --app superset
报如下错误:
(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 [admin@fab.org]:
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 clicli_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 mainrv = self.invoke(ctx)File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/click/core.py", line 1259, in invokereturn _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 invokereturn ctx.invoke(self.callback, **ctx.params)File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/click/core.py", line 610, in invokereturn callback(*args, **kwargs)File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/flask_appbuilder/console.py", line 137, in create_adminauth_type.get(_appbuilder.sm.auth_type, "No Auth method")
AttributeError: 'NoneType' object has no attribute 'auth_type'
解决方法
删除superset.db数据库文件,重新初始化数据库即可
比如,我目前linux登录用户名layne,我的superset.db文件在/home/layne/.superset/superset.db
,删除该文件:
(superset) [layne@hadoop102 ~]$ cd /home/layne/.superset/
(superset) [layne@hadoop102 .superset]$ rm -f superset.db
然后重新初始化数据库:
(superset) [layne@hadoop102 ~]$ superset db upgrade
再次创建admin用户,发现可以创建成功:
(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 [admin@fab.org]:
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,大功告成!
【已解决】superset创建admin用户失败:Error! User already exists user 或 AttributeError: ‘NoneType‘相关推荐
- 已解决pandas创建DataFrame对象失败
已解决(pandas创建DataFrame对象失败)ValueError: Shape of passed values is (1509, 1), indices imply (1509, 2) 文 ...
- mysql安装尝试创建新用户失败_Linux MySQL yum安装 创建新用户
一.wget http://dev.mysql.com/get/mysql57-community-release-el6-8.noarch.rpm 二.yum localinstall mysql5 ...
- 已解决window7/window8安装Python失败
已解决(window7/window8安装Python失败)One or more issues caused the setup to fail.Please fix the issues and ...
- (已解决)Win10下MikTeX update error报错:code=56, url=http://ftp.yzu.edu.tw/CTAN/systems/win32/miktex/...
win10系统下 MikTeX update error 按照官网(https://miktex.org/howto/install-miktex) 安装好 MikTeX 后,按照官网教程运行MikT ...
- 【已解决】ansible 命令报错 Error -5 while decompressing data: incomplete or truncated stream
一.报错信息: 执行ansible命令时报错 ERROR! Unexpected Exception, this is probably a bug: Error -5 while decompres ...
- 【已解决】mysql连接出错:ERROR 1040 (HY000): Too many connections
连接mysql,结果出错: ? 1 ERROR 1040 (HY000): Too many connections 去修改mysql的配置文件,然后添加: ? 1 2 3 4 5 6 7 8 9 1 ...
- 【已解决】百度云分享失败
来看这篇文章的一定都看到过[啊哦,你来晚了,分享的文件已经被取消了,下次要早点哟.] --------------------------------------------------------- ...
- 已解决Idea创建maven工程没有src目录的情况
第一次使用idea创建maven项目一直没有src目录,最终解决,记录一下. File->Setting->Bulid,Exception,Deployment->Build Too ...
- hibernate4.x自动建表时候创建外键失败ERROR: HHH000389: Unsuccessful: alter table ORDERS_NOPK1 add index
1 错误描述: 场景:hibernate 自动建立非主键多对一关联时候 ERROR: HHH000389: Unsuccessful: alter table ORDERS_NOPK1 add ind ...
最新文章
- git创建与合并分支
- Java学习笔记30
- #define与typedef的区别!
- Android缓存学习入门(二)
- Jsp+Ssm+Mysql实现简单的物流快递管理
- 用Java绘制柱形图_Java使用JFreeChart绘制柱形图
- 嵌入式操作系统内核原理和开发(信号量)
- seaborn-heatmap
- html语言隔开的代码,2、HTML(示例代码)
- 【虚拟校园】虚拟学生入学清华,中国传媒大学打造元宇宙大学
- Android实战【仿探探陌生社交APP】
- Diablo3英雄榜-API分析
- 直播带货app源码,实现直播的秒开和优化
- 微信公众号渠道二维码怎么生成?可以进行用户分组吗?
- AAM(Active Appreance Model)算法用于人脸识别总结
- mysql小知识:根据指定日期,获取是当年第几周
- 低频能不能采到高频?采样定理指导硬件设计
- Tensorflow学习之tf.keras(一) tf.keras.layers.Model(另附compile,fit)
- qps多少才算高并发_要大到什么程度?才算高并发?
- VRRP概念及工作过程
热门文章
- MATLAB计算杨氏模量,基于MATLAB处理动态图像的杨氏模量测量方法.doc
- 搜索引擎优化(SEO)-怎样提高你的网站在搜索引擎上的排名
- ✖ 2 problems (0 errors, 2 warnings) 0 errors and 2 warnings potentially fixable with the `--fix`
- layui使用label标签
- Redis实战 - 11 Redis GEO 实现附近的人功能
- DocuCentre SC2020 打印机连接
- 解决MySQL远程过程调用失败
- Java堆空间(Heap Space)
- 谷歌seo关键词怎么做?Google如何优化关键词
- 【LeNet-MNIST】