转自:
-
BUG1
ExtDeprecationWarning: Importing flask.ext.sqlalchemy is deprecated, use flask_sqlalchemy instead.
.format(x=modname), ExtDeprecationWarning解决办法:
此错误信息出现在对 flask 进行拓展时导入包的方式上错误:from flask.ext.script import Manager
正确:from flask_script import Manager
-
BUG2
TypeError: 'bool' object is not callable
解决办法:
flask_login 0.3之后将authenticated从函数更改为属性把g.user.is_authenticated() 修改为g.user.is_authenticated -
BUG3
第三方模块登录(OPenid)登录出错
Login requested for OpenID="", remember_me=False
解决办法暂时没找到 改用本地登录原因:获得用户时出错
-
BUG4
**IndentationError: unexpected indent **原因:可能是tab和空格没对齐的问题,需要检查下tab和空格
+BUG5
TypeError: Unicode-objects must be encoded before hashing
原因:未进行编码
-
BUG6
jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'author'
原因:user中post传参错误
-
BUG7
sqlalchemy.exc.IntegrityError原因:数据库中的用户名不唯一
思考:为防止数据重复出现,在两个或者多线程/进程进行并行存取数据库时,怎么解决?
-
-
BUG8
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table原因:没有创建相应的数据库
-