Scrapy框架使用过程中可能出现的问题(更新ing)

  1. 在cmd中输入Scrapy crawl mySpider,出现错误提示:
    Scrapy 1.3.0 - no active project
    Unknown command: crawl
    Use “scrapy” to see available commands
    根据scrapy官方文档中的解释,crawl会去搜索cmd目录下的scrapy.cfg,当前crawl的目录中没有scrapy.cfg
    scrapy在使用命令startproject的时候会自动创建scrapy.cfg,如果没有的话则需要自己主动创建:
[settings]
default = 你的项目名.settings
[deploy]
\#url = http://localhost:6800
project = 你的项目名
  1. unhandled error in deferred
    这是pywin32版本不对造成的(位数),比如我之前不是在官网下载的python3.6,上面没有标注32位或64.32均可用的版本,以直没发现是32bit的。这样就造成一些不必要的错误。
    解决方法:
    去官方下载pywin32对应于你自己安装的Python2.x,Python3.x,64/32的版本,然后将scrapy卸载之后,重新安装正确的版本

猜你喜欢

转载自blog.csdn.net/qq_28301007/article/details/79071528