scrapy crawl [spider-name] fault

后端 未结 2 1072
無奈伤痛
無奈伤痛 2021-01-15 00:52

Hi guys i am building a web scraping project using scrapy framework and python. In spider folder of my project i have two spiders named spider1 and spider2

spider1.p

相关标签:
2条回答
  • 2021-01-15 01:29

    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.

    0 讨论(0)
  • 2021-01-15 01:31

    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.

    0 讨论(0)
提交回复
热议问题