版权声明:本文为博主原创文章,未经博主允许不得转载。

环境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'的解决办法的更多相关文章

  1. AttributeError: 'unicode' object has no attribute 'tzinfo' 未解决

    Internal Server Error: /demo/machineinfo.htmlTraceback (most recent call last): File "C:\Python ...

  2. PyQt程序执行时报错:AttributeError: 'winTest' object has no attribute 'setCentralWidget'的解决方法

    用QtDesigner设计了一个UI界面,保存在文件Ui_wintest.ui中,界面中使用了MainWindow窗口,窗口名字也叫MainWindow,用PyUIC将其转换成了 Ui_wintest ...

  3. AttributeError: 'module' object has no attribute 'X509_up_ref'

    主要报错: AttributeError: 'module' object has no attribute 'X509_up_ref' 1 解决办法 卸载再重装pyOpenSSL pip unins ...

  4. 关于flask登录视图报错AttributeError: '_AppCtxGlobals' object has no attribute 'user'

    在一个小程序中写了一个登录视图函数,代码如下: @app.route('/login',methods = ['GET','POST']) @oid.loginhandler def login(): ...

  5. flask 表单填充数据报错!AttributeError: 'dict' object has no attribute 'getlist'

    报错信息: AttributeError: 'dict' object has no attribute 'getlist' 解决: 虽然是小毛病,不得不说还是自己太粗心大意了.

  6. AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'

    /*************************************************************************** * AttributeError: 'modu ...

  7. 解决window7 x64位Anaconda启动报错:AttributeError: '_NamespacePath' object has no attribute 'sort'

    最近论文需要用到python做数据分析,python语法简单,但是Windows下安装第三方包恶心的要命,statsmodels用pip死活安装不上,网上查了说包相互依赖windows下的pip不能下 ...

  8. flask_route错误:AttributeError: 'function' object has no attribute 'route'

    问题: 路由完全正确,当只有一个名为home的函数处理这个路由时候,下一个路由处理函数,总是提示没有这个rotue属性 Traceback (most recent call last): File ...

  9. 解决Win7(x64)Anaconda3报错:AttributeError: '_NamespacePath' object has no attribute 'sort'

    最近论文需要用到python做数据分析,python语法简单,但是Windows下安装第三方包恶心的要命,statsmodels用pip死活安装不上,网上查了说包相互依赖windows下的pip不能下 ...

随机推荐

  1. 9.13noip模拟试题

    题目名称 “与” 小象涂色 行动!行动! 输入文件 and.in elephant.in move.in 输出文件 and.out elephant.in move.in 时间限制 1s 1s 1s ...

  2. Windows Azure上的Odoo(OpenERP)

    OpenERP 改名为 Odoo 了,感觉名字怪怪的.Windows Azure也进入国内了,学习了一段时间的Azure,把它门结合在一起搞搞吧!本系列文章不涉及开发,纯属环境搭建及Odoo 系统功能 ...

  3. 面试题——分析从输入url到页面返回的过程(或者查询返回过程)

    1. You enter a URL into the browser(输入一个url地址) 2.The browser looks up the IP address for the domain ...

  4. 新建android系统服务

    一.Android系统服务 Android提供了很多系统服务:如ActivityManger,PowerManger,WindowManger,WifiManger等等. 这些服务都是系统启动开始就一 ...

  5. windowIsTranlucent 属性

    项目中踩的大坑.  先埋. int alwaysFinish = 0; if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERS ...

  6. Directory类

    string[] pathes = Directory.GetDirectories(@"G:\ReawFiles");//获得所有的文件夹 string[] pathes = D ...

  7. linux书籍推荐(转)

    ref: http://www.cnblogs.com/jiangjh/archive/2011/06/27/2091164.html#commentform 入门篇 <LINUX权威指南> ...

  8. nodejs原生模块简介

    一.Express框架 前面的章节已经介绍过了,可以使用npm来安装node.js模块.具体操作请参照以前写的nodejs概论. Express是一个nodejs的web开源框架,用于快速的搭建web ...

  9. C++学习之DLL注入

    #include<stdio.h> #include<Windows.h> #include<TlHelp32.h> //typedef unsigned long ...

  10. 如何让Hadoop运行得更快一些

    在数据处理方面,我们发现数据输入速度一般要比的数据处理速度快很多,这种现象在大多数据领域尤为明显.随着数据不断膨胀,相应的响应时间自然要有所增加,数据处理的复杂度也在不断提高.作为一个开发者,我们自然 ...