
bug
muttry
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
django.db.utils.InternalError: (1366, "Incorrect string value: '\\xE5\\x9B\\xBE\\xE4\\xB9\\xA6' for
django.db.utils.InternalError: (1366, "Incorrect string value: '\\xE5\\x9B\\xBE\\xE4\\xB9\\xA6' for column 'name' at row 1")bash: 未预期的符号 `1366,' 附近有语法错误解决:由于字段中有汉字,创建库时添加 charset=utf8, ...原创 2018-07-21 14:49:41 · 3507 阅读 · 0 评论 -
TypeError: 'module' object is not callable
TypeError: 'module' object is not callable解决:模块非法调用,根据错误信息找到大概报错位置,看 模块.方法 是否有错例子 imoport requests直接用模块名 requsets(url= url,headers=headers)正确用法 ,模块名.方法 requests.get(url= url,headers=headers)...原创 2018-08-23 11:29:43 · 4496 阅读 · 0 评论 -
mongod启动错误
~$ sudo mongod[sudo] python 的密码: 2018-08-28T09:53:26.973+0800 I CONTROL [initandlisten] MongoDB starting : pid=4702 port=27017 dbpath=/data/db 64-bit host=ubuntu2018-08-28T09:53:26.973+0800 I CONT...原创 2018-08-28 10:08:56 · 755 阅读 · 0 评论 -
mongo命令错误
/$ mongoMongoDB shell version: 3.2.8connecting to: test2018-08-28T10:11:30.005+0800 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused2018-08-28T10:11:...原创 2018-08-28 10:20:36 · 1123 阅读 · 0 评论 -
django.core.exceptions.ImproperlyConfigured: "^smscodes / ”is not a valid regular expression: unknow
django.core.exceptions.ImproperlyConfigured: "^smscodes / (?P < mobile > 1[345789]\d{9})/$" is not a valid regular expression: unknown extension ?P at position 13错误1:所编写的发送短信接口没有在settings中的I...原创 2018-09-02 10:41:05 · 1310 阅读 · 0 评论 -
SystemError: Parent module '' not loaded, cannot perform relative import
SystemError: Parent module '' not loaded, cannot perform relative import解决:循环导包,导包路径出错 定位到views.py中,删除了导包语句from . import Users重新导入,把 . 换成具体路径from app.db import Users跟改所有类似的导包,右击,点击=== 应用级文件...原创 2018-09-22 14:49:21 · 2598 阅读 · 0 评论 -
INFO [alembic.runtime.migration] Context impl MySQLImpl. INFO [alembic.runtime.migration] Will ass
问题:flask数据库迁移,只有一个版本表,没有生成其他表INFO [alembic.runtime.migration] Context impl MySQLImpl.INFO [alembic.runtime.migration] Will assume non-transactional DDL.解决:from app import models#1导入模型,导入表m...原创 2018-09-22 21:02:28 · 4908 阅读 · 0 评论 -
"AssertionError: View function mapping is overwriting an existing endpoint function"
问题:AssertionError: View function mapping is overwriting an existing endpoint function"解决:这个异常信息,就说明定义了多个同名的视图函数,只需要改成不同的函数名即可。 ...原创 2018-09-27 20:08:55 · 5576 阅读 · 0 评论 -
问题:代码正常,蓝图无效 俩个蓝图模块home和admin,home正常,url_map里没有admin系列蓝图视图
问题:代码正常,蓝图无效 俩个模块home和admin,home正常,url_map里没有admin系列蓝图视图原因:原因不明,俩个模块,home的蓝图使用正常,admin蓝图装饰返回的全是404,并且url_map里没有相应视图 猜测问题原因 1 404不是指这个链接不存在,而是由 SQLAlchemy 的查询 _or_404() 引起的。 ...原创 2018-09-29 19:07:46 · 400 阅读 · 1 评论