dataabc / weibo-search

获取微博搜索结果信息,搜索即可以是微博关键词搜索,也可以是微博话题搜索
1.67k stars 369 forks source link

cmd点击运行之后,为什么会出现以下情况呢? #393

Open zhanglu19970326 opened 1 year ago

zhanglu19970326 commented 1 year ago

D:\weibo\weibo-search-master>scrapy crawl search Traceback (most recent call last): File "D:\Programs\Python\Python38\lib\runpy.py", line 193, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\Programs\Python\Python38\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\Programs\Python\Python38\Scripts\scrapy.exe__main.py", line 7, in File "D:\Programs\Python\Python38\lib\site-packages\scrapy\cmdline.py", line 160, in execute cmd.crawler_process = CrawlerProcess(settings) File "D:\Programs\Python\Python38\lib\site-packages\scrapy\crawler.py", line 332, in init super().init(settings) File "D:\Programs\Python\Python38\lib\site-packages\scrapy\crawler.py", line 202, in init self.spider_loader = self._get_spider_loader(settings) File "D:\Programs\Python\Python38\lib\site-packages\scrapy\crawler.py", line 196, in _get_spider_loader return loader_cls.from_settings(settings.frozencopy()) File "D:\Programs\Python\Python38\lib\site-packages\scrapy\spiderloader.py", line 72, in from_settings return cls(settings) File "D:\Programs\Python\Python38\lib\site-packages\scrapy\spiderloader.py", line 27, in init self._load_all_spiders() File "D:\Programs\Python\Python38\lib\site-packages\scrapy\spiderloader.py", line 56, in _load_all_spiders for module in walk_modules(name): File "D:\Programs\Python\Python38\lib\site-packages\scrapy\utils\misc.py", line 106, in walk_modules submod = import_module(fullpath) File "D:\Programs\Python\Python38\lib\importlib\init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 779, in exec_module File "", line 916, in get_code File "", line 846, in source_to_code File "", line 219, in _call_with_frames_removed File "D:\weibo\weibo-search-master\weibo\spiders\search.py", line 157 else: ^ SyntaxError: invalid syntax

dataabc commented 1 year ago

可能和cmd工具有关,换个cmd软件看看。