为了账号安全,请及时绑定邮箱和手机立即绑定

main.py 执行的时候报错

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'


正在回答

2 回答

兄弟你解决了吗  我和你一模一样的错误

0 回复 有任何疑惑可以回复我~

你为什么会有“douban_spider.settings”这个文件?


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

main.py 执行的时候报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信