萌新求助--跟着小甲鱼上课写的scrapy爬虫为啥报错了
3.8.6版本,前两天就遇到这样的问题了,看着像是软件自带的文件问题,不像是么我写错代码。。。。。。昨天跟着一个视频通在cmd里面直接调用scrapy shell写代码运行居然能抓到数据,今天再跟着小甲鱼63课用Python又遇到了同样的问题
重装软件重启系统以后后还是一样
求大神帮帮忙给点提示
bug如下:
Traceback (most recent call last):
File "d:\python\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None,
File "d:\python\lib\runpy.py", line 87, in _run_code exec(code, run_globals)
File "D:\Python\Scripts\scrapy.exe\__main__.py", line 7, in <module>
File "d:\python\lib\site-packages\scrapy\cmdline.py", line 144, in execute cmd.crawler_process = CrawlerProcess(settings)
File "d:\python\lib\site-packages\scrapy\crawler.py", line 280, in __init__ super().__init__(settings)
File "d:\python\lib\site-packages\scrapy\crawler.py", line 152, in __init__ self.spider_loader = self._get_spider_loader(settings)
File "d:\python\lib\site-packages\scrapy\crawler.py", line 146, in _get_spider_loader return loader_cls.from_settings(settings.frozencopy())
File "d:\python\lib\site-packages\scrapy\spiderloader.py", line 67, in from_settingsreturn cls(settings)
File "d:\python\lib\site-packages\scrapy\spiderloader.py", line 24, in __init__ self._load_all_spiders()
File "d:\python\lib\site-packages\scrapy\spiderloader.py", line 51, in _load_all_spiders for module in walk_modules(name):
File "d:\python\lib\site-packages\scrapy\utils\misc.py", line 89, in walk_modules submod = import_module(fullpath)
File "d:\python\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name, 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 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 779, in exec_module
File "<frozen importlib._bootstrap_external>", line 916, in get_code
File "<frozen importlib._bootstrap_external>", line 846, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
SyntaxError: invalid syntax
沙发自己先占一个
前几天第一次遇到问题的时候不知天高地厚地跟着报错去改系统文件
折腾了6个多小时最后还是剩下两条问题改不掉,整个人都快气炸了
昨天又遇到同样问题
今天还是一样
页:
[1]