所遇问题
danhuazhou
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
安装scrapy时出现error: Microsoft Visual C++ 14.0 is required问题
安装scrapy时出现error: Microsoft Visual C++ 14.0 is required问题解决方法:1.下载twisted对应whl文件下载网址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#twistedcp后面是python版本,win后面代表32位或者64位2.下载Microsoft Visual C++ 14.0.下载安装后...原创 2018-03-09 19:04:42 · 992 阅读 · 0 评论 -
安装scrapy出现time out问题
安装scrapy出现time out问题解决方法:如果安装过程中提示time out,那么采用下面的命令来安装pip install -i https://pypi.douban.com/simple scrapy原创 2018-03-09 19:05:55 · 2502 阅读 · 7 评论 -
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot exe
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement在安装mysql,修改root密码时候出错原因:权限没有刷新解决:flush privileges;...原创 2018-03-09 19:07:06 · 1550 阅读 · 0 评论 -
_tkinter.TclError: bad geometry specifier "200×100"
_tkinter.TclError: bad geometry specifier "200×100"import tkinter as tkwindow = tk.Tk()window.title('my window')#这里应该写200×100,应该写成200x100,x是小写字母x不是乘号window.geometry('200×100')...原创 2018-03-09 19:07:52 · 7477 阅读 · 1 评论 -
IndentationError: expected an indented block
IndentationError: expected an indented blockimport randomrandom_list = []for i in range(0,100):rand = random.randint(0,30)random_list.append(rand)print(random_list)for ran in random_list:#出错位置def get_...原创 2018-03-09 19:09:33 · 680 阅读 · 0 评论 -
FileNotFoundError: [Errno 2] No such file or directory
FileNotFoundError: [Errno 2] No such file or directory代码如下filehand = open('d:/file/ads.txt','w')filehand.write('abcd')filehand.close()原因:d盘下午file文件夹,w模式在没有ads.txt时会自动创建该文件,但不会创建文件夹。...原创 2018-03-09 19:10:23 · 31994 阅读 · 0 评论 -
scrapy爬虫问题items与pipelines
scrapy爬虫问题items与pipelines问题描述:在爬虫py文件里写了两次yield item(两个item内容不同),在pipelines分别写了两个与item对应的pipeline,item传输的数据只能进入优先级高的pipeline。解决:因为item传输的数据会传给每个pipeline(setting已设置),所以会出现以上问题。假设Aitem、Bitem、Apipeline、B...原创 2018-03-09 19:11:12 · 2016 阅读 · 1 评论 -
jinja2.exceptions.UndefinedError: 'app.models.Comment object' has no attribute 'movie'
{% for v in page_data.items %}<div class="comment-text"> <span class="username"> {{ v.user.name }} ...原创 2018-07-26 17:09:38 · 2486 阅读 · 1 评论
分享