from scrapy import cmdline cmdline.execute('scrapy crawl douban_spider'.split())
********
Traceback (most recent call last):
File "/Users/yangdong/PycharmProjects/douban/douban_spider/douban_spider/main.py", line 3, in <module>
cmdline.execute('scrapy crawl douban_spider'.split())
File "/Users/yangdong/PycharmProjects/douban/venv/lib/python3.6/site-packages/scrapy/cmdline.py", line 110, in execute
settings = get_project_settings()
File "/Users/yangdong/PycharmProjects/douban/venv/lib/python3.6/site-packages/scrapy/utils/project.py", line 68, in get_project_settings
settings.setmodule(settings_module_path, priority='project')
File "/Users/yangdong/PycharmProjects/douban/venv/lib/python3.6/site-packages/scrapy/settings/__init__.py", line 288, in setmodule
module = import_module(module)
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'douban_spider.settings'
兄弟你解决了吗 我和你一模一样的错误
你为什么会有“douban_spider.settings”这个文件?