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

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

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

呼啦一阵风 2021-08-05 17:17:34
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我究竟做错了什么?
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 236 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信