![](https://img-blog.csdnimg.cn/20210728230027255.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
错题笔记
要做一个因为写错很多代码 而记住很多代码的人!
Trick fairy
这个作者很懒,什么都没留下…
展开
-
[错题笔记] 安装包时报错:Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after c
安装包时报错:Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/flask-migrate/百度翻译了一下这个原创 2021-10-04 11:59:41 · 2061 阅读 · 0 评论 -
[错题笔记] 报错:‘sqlalchemy.orm.collections.InstrumentedList object‘ has no attribute ‘content‘
报错:jinja2.exceptions.UndefinedError: 'sqlalchemy.orm.collections.InstrumentedList object' has no attribute 'content'一、报错前提:1. 有一张表user和一张表aboutme,其中foreignkey写在了aboutme上关于aboutme主要代码为:class AboutMe(db.Model): id = db.Column(db.Integer, primary原创 2021-08-20 17:47:19 · 589 阅读 · 0 评论 -
[错题笔记] 当flask_migrate没有MigrateCommand时
当flask_migrate没有MigrateCommand时可能是flask_migrate版本太高了可用 pip install flask_migrate==xx 命令把flask_migrate降低一个版本这里用的2.7.0版本的把问题解决了原创 2021-07-03 21:40:54 · 1930 阅读 · 3 评论 -
[错题笔记]报错:Could not build url for endpoint ‘user1.check_phone ‘. Did you mean ‘user1.check_phone‘ ins
当用url_for反向解析时,一般的报错为:Could not build url for endpoint 'user.check_phone '. Did you mean 'user1.check_phone' instead?注意加粗的地方:两个名称不一样①②①'user.check_phone ' ②'user1.check_phone'一般小编遇到这种错误时,找到对应url_for的那段代码,把url_for里面的值换成②'user1.check_phone'就行了。但是原创 2021-07-28 22:53:19 · 935 阅读 · 0 评论 -
[错题笔记]报错:(1366, “Incorrect integer value: ‘undefined‘ for column ‘user_id‘ at row 1“)
这段报错代码的意思是所写的值没能成功传给模型类。小编之所以会报错,是因为在我的模板加了这段js代码:为此引出为什么js代码传不了值?<script>$('#btnbuy').click(function(){goods_id = $(this).attr('tag');user_id = $('select [name="uid"]').val();location.href='buy?uid='+user_id+'&gid='+goods_id})&l原创 2021-07-28 22:29:07 · 382 阅读 · 0 评论