Scrapy——错误导入错误:没有名为tutorial.settings的模块

Scrapy 文件说


Scrapy 将在标准位置的 ini 风格的 scrapy.cfg 文件中寻找配置参数:/etc/scrapy.cfg


我已将 放在该scrapy.cfg位置/etc/scrapy.cfg并尝试scrapy crawl <spider_name>在项目根目录中运行 tutorial。我收到错误:


Traceback (most recent call last):


  File "/home/user/.local/bin/scrapy", line 11, in <module>

    sys.exit(execute())


  File "/home/user/.local/lib/python2.7/site-packages/scrapy/cmdline.py", line 110, in execute

    settings = get_project_settings()


  File "/home/user/.local/lib/python2.7/site-packages/scrapy/utils/project.py", line 68, in get_project_settings

    settings.setmodule(settings_module_path, priority='project')


File "/home/user/.local/lib/python2.7/site-packages/scrapy/settings/__init__.py", line 292, in setmodule

    module = import_module(module)


File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module

    __import__(name)


ImportError: No module named tutorial.settings

我究竟做错了什么?


呼啦一阵风
浏览 237回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python