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

main.py文件在ssh里面可以执行,但是到了pycharm就不行了

"C:\Program Files\Python38\python.exe" C:/Users/Administrator/Desktop/study_python/douban/douban/main.py

Traceback (most recent call last):

  File "C:/Users/Administrator/Desktop/study_python/douban/douban/main.py", line 3, in <module>

    cmdline.execute('scrapy crawl douban_spider'.split())

  File "C:\Program Files\Python38\lib\site-packages\scrapy\cmdline.py", line 112, in execute

    settings = get_project_settings()

  File "C:\Program Files\Python38\lib\site-packages\scrapy\utils\project.py", line 69, in get_project_settings

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

  File "C:\Program Files\Python38\lib\site-packages\scrapy\settings\__init__.py", line 287, in setmodule

    module = import_module(module)

  File "C:\Program Files\Python38\lib\importlib\__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import

  File "<frozen importlib._bootstrap>", line 991, in _find_and_load

  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'douban.settings'


Process finished with exit code 1


正在回答

2 回答

"C:\Program Files\Python38\python.exe" C:/Users/Administrator/Desktop/study_python/douban/douban/main.py

Traceback (most recent call last):

  File "C:/Users/Administrator/Desktop/study_python/douban/douban/main.py", line 3, in <module>

    cmdline.execute('scrapy crawl douban_spider'.split())

  File "C:\Program Files\Python38\lib\site-packages\scrapy\cmdline.py", line 112, in execute

    settings = get_project_settings()

  File "C:\Program Files\Python38\lib\site-packages\scrapy\utils\project.py", line 69, in get_project_settings

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

  File "C:\Program Files\Python38\lib\site-packages\scrapy\settings\__init__.py", line 287, in setmodule

    module = import_module(module)

  File "C:\Program Files\Python38\lib\importlib\__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import

  File "<frozen importlib._bootstrap>", line 991, in _find_and_load

  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'douban.settings'. No module named

Process finished with exit code 1 code 2 code 3

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

"C:\Program Files\Python38\python.exe" C:/Users/Administrator/Desktop/study_python/douban/douban/main.py

Traceback (most recent call last):

  File "C:/Users/Administrator/Desktop/study_python/douban/douban/main.py", line 2, in <module>

    cmdline.execute('scrapy crawl douban_sprider'.split())

  File "C:\Program Files\Python38\lib\site-packages\scrapy\cmdline.py", line 112, in execute

    settings = get_project_settings()

  File "C:\Program Files\Python38\lib\site-packages\scrapy\utils\project.py", line 69, in get_project_settings

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

  File "C:\Program Files\Python38\lib\site-packages\scrapy\settings\__init__.py", line 287, in setmodule

    module = import_module(module)

  File "C:\Program Files\Python38\lib\importlib\__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import

  File "<frozen importlib._bootstrap>", line 991, in _find_and_load

  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'douban.settings'


Process finished with exit code 1


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

WaterSprite

请问你解决了吗
2021-04-01 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

main.py文件在ssh里面可以执行,但是到了pycharm就不行了

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