对于AttributeError: 'Flask' object has no attribute 'cli'的解决办法
版权声明:本文为博主原创文章,未经博主允许不得转载。
环境flask-script2.0.5、flask0.10.1
运行官方文档sample
出现问题
c:\kk\flask\examples\flaskr>python test_flaskr.py
Traceback (most recent call last):
File "test_flaskr.py", line 15, in <module>
import flaskr
File "c:\kk\flask\examples\flaskr\flaskr.py", line 48, in <module>
@app.cli.command('initdb')
AttributeError: 'Flask' object has no attribute 'cli'
最后在
https://github.com/mitsuhiko/flask/issues/1048
找到答案
运行命令行
c:\kk\flask\examples\flaskr>pip install https://github.com/mitsuhiko/flask/tarba
ll/master
即可 亲测 完美解决
然后运行正常,特此记录
对于AttributeError: 'Flask' object has no attribute 'cli'的解决办法的更多相关文章
- AttributeError: 'unicode' object has no attribute 'tzinfo' 未解决
Internal Server Error: /demo/machineinfo.htmlTraceback (most recent call last): File "C:\Python ...
- PyQt程序执行时报错:AttributeError: 'winTest' object has no attribute 'setCentralWidget'的解决方法
用QtDesigner设计了一个UI界面,保存在文件Ui_wintest.ui中,界面中使用了MainWindow窗口,窗口名字也叫MainWindow,用PyUIC将其转换成了 Ui_wintest ...
- AttributeError: 'module' object has no attribute 'X509_up_ref'
主要报错: AttributeError: 'module' object has no attribute 'X509_up_ref' 1 解决办法 卸载再重装pyOpenSSL pip unins ...
- 关于flask登录视图报错AttributeError: '_AppCtxGlobals' object has no attribute 'user'
在一个小程序中写了一个登录视图函数,代码如下: @app.route('/login',methods = ['GET','POST']) @oid.loginhandler def login(): ...
- flask 表单填充数据报错!AttributeError: 'dict' object has no attribute 'getlist'
报错信息: AttributeError: 'dict' object has no attribute 'getlist' 解决: 虽然是小毛病,不得不说还是自己太粗心大意了.
- AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'
/*************************************************************************** * AttributeError: 'modu ...
- 解决window7 x64位Anaconda启动报错:AttributeError: '_NamespacePath' object has no attribute 'sort'
最近论文需要用到python做数据分析,python语法简单,但是Windows下安装第三方包恶心的要命,statsmodels用pip死活安装不上,网上查了说包相互依赖windows下的pip不能下 ...
- flask_route错误:AttributeError: 'function' object has no attribute 'route'
问题: 路由完全正确,当只有一个名为home的函数处理这个路由时候,下一个路由处理函数,总是提示没有这个rotue属性 Traceback (most recent call last): File ...
- 解决Win7(x64)Anaconda3报错:AttributeError: '_NamespacePath' object has no attribute 'sort'
最近论文需要用到python做数据分析,python语法简单,但是Windows下安装第三方包恶心的要命,statsmodels用pip死活安装不上,网上查了说包相互依赖windows下的pip不能下 ...
随机推荐
- asp.net 读取sql存储过程返回值
关于Exec返回值的问题有很多,在这做个简要的总结. 读查询语句示例: Declare @count int select @Count 要点: ...
- Objective-C 类,函数调用
// // main.m // L02HelloObjC // // Created by JinXin on 15/11/25. // Copyright © 2015年 JinXin. All r ...
- jquery中$.ajax的$.get与$.post使用
<script type='text/javascript' src='http://ajax.useso.com/ajax/libs/jquery/1.7.2/jquery.min.js?ve ...
- javascript判断浏览器是否是隐私模式
判断浏览器是否是隐私模式,隐私模式下有写api不可用 1. try { localStorage['test'] = 'test'; //localStorage和sessionStorage都存在, ...
- tomcat中有关配置文件的说明
在以往的tomcat使用中本人一直都没有注意到tomcat的conf目录下配置文件的作用,都是"拿来主义"的思想,从未深究.但是最近遇到很多有关tomcat配置的问题,很是头大,所 ...
- POJ 2674 Linear world
POJ 2674 Linear world 题目大意: 一条线上N只蚂蚁,每只蚂蚁速度固定,方向和坐标不同,碰头后掉头,求最后掉下去那只蚂蚁的时间和名字. 注意两点: 相撞可视为擦肩而过,蚂蚁们不管掉 ...
- MySQL分库分表环境下全局ID生成方案
在大型互联网应用中,随着用户数的增加,为了提高应用的性能,我们经常需要对数据库进行分库分表操作.在单表时代,我们可以完全依赖于数据库的自增ID来唯一标识一个用户或数据对象.但是当我们对数据库进行了分库 ...
- ActiveX相关
ActiveX 1.创建ActiveXhttp://blog.csdn.net/fww330666557/article/details/6533118 继承IObjectSafety接口http:/ ...
- 深入了解使用egret.WebSocket
概念 本教程不讲解TCP/IP协议,Socket属于哪层,消息包体怎么设计等,主讲 egret.WebSocket 使用示例 与 protobuf 使用示例. 在使用egret.WebSocket之前 ...
- rename 后缀
for file in $(find . -name "*.del" -type f);do mv "$file" "${file%.del}&quo ...