对于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不能下 ...
随机推荐
- shijan
1.<?php 2. $zero1=date(“y-m-d h:i:s”); 3. $zero2=”2010-11-29 21:07:00′; 4. echo “zero1的时间为:”.$zer ...
- visual studio 2015 删除空行 ,缩进css
查找 ^(?([^\r\n])\s)*\r?$\r?\n
- 获取html页面所有的img标签
#region 获取html中所有Img Regex r = new Regex(@"<img[\s\S]*?>", RegexOptions.IgnoreCase); ...
- (转)Android Touch事件传递机制
-----来源:http://www.trinea.cn/android/touch-event-delivery-mechanism/ 介绍Android Touch事件的传递机制. 不少朋友私信问 ...
- 你好,C++(39)6.4.4 依葫芦画瓢:用C++表达设计结果(下)
6.4.4 依葫芦画瓢:用C++表达设计结果 完成上面的分析与设计之后,小陈感觉已经成竹在胸胜利在望了.他知道,只要完成了程序中的类以及类之间关系的分析和设计,整个程序就相当于已经完成了一大半.接下 ...
- Java学习----你的选择是什么-条件结构
import java.util.Scanner; public class Student { public static void main(String[] args) { byte money ...
- underscorejs-contains学习
2.12 contains 2.12.1 语法: _.contains(list, item, fromIndex, guard) 2.12.2 说明: list集合包含指定的值则返回true,否则返 ...
- extjs combobox 设置下拉时显示滚动条 设置显示条数
extjs在点击下拉时如果没有限制它的高度,那么它的默认最大高度是300,显示的时候就会显示300的高度,知道选项内容超过这个高度时才会自动显示滚动条,往往在有些时候我们希望让combobox显示一个 ...
- html中插入flash代码详解(转载)
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://down ...
- Phalcon 的 bootstrap.php 自动加载完成;非常人性化的设计
<?php /** * Bootstraps the application */ use Phalcon\DI\FactoryDefault as PhDi, Phalcon\Config a ...