mizhdi / stockSpider

学python写的抓雪球文章的爬虫,基于Scrapy
9 stars 6 forks source link

ImportError: bad magic number in 'stock.spiders.topStockSpider': b'\x03\xf3\r\n' #1

Open SeekPoint opened 5 years ago

SeekPoint commented 5 years ago

C:\ub16_prj\stockSpider>scrapy crawl stock Traceback (most recent call last): File "c:\users\andyy\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\andyy\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\andyy\AppData\Local\Programs\Python\Python37\Scripts\scrapy.exe__main.py", line 9, in File "c:\users\andyy\appdata\local\programs\python\python37\lib\site-packages\scrapy\cmdline.py", line 149, in execute cmd.crawler_process = CrawlerProcess(settings) File "c:\users\andyy\appdata\local\programs\python\python37\lib\site-packages\scrapy\crawler.py", line 249, in init super(CrawlerProcess, self).init(settings) File "c:\users\andyy\appdata\local\programs\python\python37\lib\site-packages\scrapy\crawler.py", line 137, in init self.spider_loader = _get_spider_loader(settings) File "c:\users\andyy\appdata\local\programs\python\python37\lib\site-packages\scrapy\crawler.py", line 336, in _get_spider_loader return loader_cls.from_settings(settings.frozencopy()) File "c:\users\andyy\appdata\local\programs\python\python37\lib\site-packages\scrapy\spiderloader.py", line 61, in from_settings return cls(settings) File "c:\users\andyy\appdata\local\programs\python\python37\lib\site-packages\scrapy\spiderloader.py", line 25, in init self._load_all_spiders() File "c:\users\andyy\appdata\local\programs\python\python37\lib\site-packages\scrapy\spiderloader.py", line 47, in _load_all_spiders for module in walk_modules(name): File "c:\users\andyy\appdata\local\programs\python\python37\lib\site-packages\scrapy\utils\misc.py", line 71, in walk_modules submod = import_module(fullpath) File "c:\users\andyy\appdata\local\programs\python\python37\lib\importlib\init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 724, in exec_module File "", line 1005, in get_code File "", line 458, in _classify_pyc ImportError: bad magic number in 'stock.spiders.topStockSpider': b'\x03\xf3\r\n'

C:\ub16_prj\stockSpider>

SeekPoint commented 5 years ago

缺少topStockSpider.py文件