Today, with pycharm commissioning new scrapy-redis Project error:
Connected to pydev debugger (build 183.4588.64)
Scrapy 1.8.0 - no active project
Unknown command: crawl
Use "scrapy" to see available commands
I did not use scrapy crawl xxx
the form of running scrapy, but wrote a startup script:
main.py:
from scrapy.cmdline import execute
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
execute(["scrapy","crawl","douban_redis"])
I looked at the error reports of others , basically because they did not use scrapy startproject xxx
the lack of which led to the creation scrapy project scrapy.cfg
file, and my project is the existence scrapy.cfg
of the file.
My directory structure:
So taking into account my startup script may be a problem. But I main.py
in other projects where it is possible, prove that the code part of the problem does not exist.
So taking into account the likely start of a problem with startup environment script, click Edit Configuration
Feel might be Working directory
a problem.
I looked at the unusual items Working directory
:
Sure enough, the cause of the error is starting to run the script environment settings error.