scrapy crawl [spider-name] fault

旧时模样 提交于 2019-12-01 12:54:33

I tackled the same problem, however removing all *.pyc files from everywhere in my project did the job.

Especially I think settings.pyc is important to remove.

Hope that helps.

Building on Nomad's answer. You can avoid the creation of all but one pyc file during development by adding:

import sys
sys.dont_write_bytecode = True

to the project's "__init__.py" file.

This will prevent .pyc files from being created. Especially useful if you are working on a project and you rename the file name of a spider. Prevents the cached pyc of the old spiders remaining, and a few other gotchas.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!