undefinedfix
Sign in

No module named ' tencent.settings '

Silverfern edited in Fri, 25 Nov 2022

Python 3.7 structure

This is what spiders start with

import scrapy

from scrapy import signals from scrapy.xlib.pydispatch import dispatcher from selenium import webdriver from tencent.items import TencentItem

Crawl error: modulenotfounderror: no module named ' tencent.settings '

C: Userslenovodesktop: ten cent > screen crawl qqnews.pyTraceback (most recent call last): File "c:userslenovoappdatalocalprogramspythonpython37 librunpy.py ", line 193, in _ run_ module_ as_ main
"__main__", mod_spec)

File "c:userslenovoappdatalocalprogramspythonpython37 librunpy.py ", line 85, in _ run_ code

exec(code, run_globals)

File "C:UserslenovoAppDataLocalProgramsPythonPython37 Scriptsscrapy.exe__ main__ .py", line 7, in <module> File "c:userslenovoappdatalocalprogramspythonpython37libsite-p ackagesscrapycmdline.py ", line 114, in execute

settings = get_project_settings()

File "c:userslenovoappdatalocalprogramspythonpython37libsite-packag esscrapyutilsproject.py ", line 69, in get_ project_ settings

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

File "c:userslenovoappdatalocalprogramspythonpython37libsite-packagesscrapysettings__ init__ .py", line 294, in setmodule

module = import_module(module)

File "c:userslenovoappdatalocalprogramspythonpython37libimportlib__ init__ .py", line 127, in import_ module

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

File "<frozen importlib._ bootstrap>", line 1006, in _ gcd_ import File "<frozen importlib._ bootstrap>", line 983, in _ find_ and_ load File "<frozen importlib._ bootstrap>", line 965, in _ find_ and_ load_ unlockedModuleNotFoundError: No module named ' tencent.settings '

beginner beginner, I hope you can help me.

0 Replies