- 帖子
- 5
- 积分
- 17
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2024-12-14
|
回复 6# Five66
pip install --upgrade scrapy_splash
更新后
Requirement already satisfied: scrapy_splash in c:\python\lib\site-packages (0.9.0)
然后运行程序还是报错下面
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\python\Scripts\scrapy.exe\__main__.py", line 7, in <module>
sys.exit(execute())
~~~~~~~^^
File "C:\python\Lib\site-packages\scrapy\cmdline.py", line 187, in execute
cmd.crawler_process = CrawlerProcess(settings)
~~~~~~~~~~~~~~^^^^^^^^^^
File "C:\python\Lib\site-packages\scrapy\crawler.py", line 424, in __init__
super().__init__(settings)
~~~~~~~~~~~~~~~~^^^^^^^^^^
File "C:\python\Lib\site-packages\scrapy\crawler.py", line 295, in __init__
self.spider_loader: SpiderLoader = self._get_spider_loader(settings)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "C:\python\Lib\site-packages\scrapy\crawler.py", line 289, in _get_spider_loader
return cast("SpiderLoader", loader_cls.from_settings(settings.frozencopy()))
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python\Lib\site-packages\scrapy\spiderloader.py", line 81, in from_settings
return cls(settings)
File "C:\python\Lib\site-packages\scrapy\spiderloader.py", line 36, in __init__
self._load_all_spiders()
~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\python\Lib\site-packages\scrapy\spiderloader.py", line 65, in _load_all_spiders
for module in walk_modules(name):
~~~~~~~~~~~~^^^^^^
File "C:\python\Lib\site-packages\scrapy\utils\misc.py", line 98, in walk_modules
submod = import_module(fullpath)
File "C:\python\Lib\importlib\__init__.py", line 88, in import_module
return _bootstrap._**_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _**_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 1022, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "C:\pythonbase\news\news\spiders\wangyi.py", line 5, in <module>
from scrapy_splash.request import SplashRequest
File "C:\python\Lib\site-packages\scrapy_splash\__init__.py", line 10, in <module>
from .dupefilter import SplashAwareDupeFilter, splash_request_fingerprint
File "C:\python\Lib\site-packages\scrapy_splash\dupefilter.py", line 12, in <module>
from scrapy.utils.request import request_fingerprint
ImportError: cannot import name 'request_fingerprint' from 'scrapy.utils.request' (C:\python\Lib\site-packages\scrapy\utils\request.py) |
|