scrapyd部署后,运行爬虫,出现FileNotFoundError

来源:16-1 scrapyd部署scrapy项目

一一倾

2017-12-04

本地运行没问题部署后运行爬虫很快就停了找不到文件FileNotFoundError不知道在哪里找原因

2017-12-04 18:43:29 [twisted] CRITICAL:
Traceback (most recent call last):
 File "c:\users\administrator\envs\p3spider\lib\site-packages\twisted\internet\defer.py", line 1386, in _inlineCallbacks
   result = g.send(result)
 File "c:\users\administrator\envs\p3spider\lib\site-packages\scrapy\crawler.py", line 77, in crawl
   self.engine = self._create_engine()
 File "c:\users\administrator\envs\p3spider\lib\site-packages\scrapy\crawler.py", line 102, in _create_engine
   return ExecutionEngine(self, lambda _: self.stop())
 File "c:\users\administrator\envs\p3spider\lib\site-packages\scrapy\core\engine.py", line 70, in __init__
   self.scraper = Scraper(crawler)
 File "c:\users\administrator\envs\p3spider\lib\site-packages\scrapy\core\scraper.py", line 71, in __init__
   self.itemproc = itemproc_cls.from_crawler(crawler)
 File "c:\users\administrator\envs\p3spider\lib\site-packages\scrapy\middleware.py", line 58, in from_crawler
   return cls.from_settings(crawler.settings, crawler)
 File "c:\users\administrator\envs\p3spider\lib\site-packages\scrapy\middleware.py", line 36, in from_settings
   mw = mwcls.from_crawler(crawler)
 File "c:\users\administrator\envs\p3spider\lib\site-packages\scrapy\pipelines\media.py", line 68, in from_crawler
   pipe = cls.from_settings(crawler.settings)
 File "c:\users\administrator\envs\p3spider\lib\site-packages\scrapy\pipelines\images.py", line 95, in from_settings
   return cls(store_uri, settings=settings)
 File "c:\users\administrator\envs\p3spider\lib\site-packages\scrapy\pipelines\images.py", line 52, in __init__
   download_func=download_func)
 File "c:\users\administrator\envs\p3spider\lib\site-packages\scrapy\pipelines\files.py", line 234, in __init__
   self.store = self._get_store(store_uri)
 File "c:\users\administrator\envs\p3spider\lib\site-packages\scrapy\pipelines\files.py", line 270, in _get_store
   return store_cls(uri)
 File "c:\users\administrator\envs\p3spider\lib\site-packages\scrapy\pipelines\files.py", line 48, in __init__
   self._mkdir(self.basedir)
 File "c:\users\administrator\envs\p3spider\lib\site-packages\scrapy\pipelines\files.py", line 77, in _mkdir
   os.makedirs(dirname)
 File "c:\users\administrator\envs\p3spider\lib\os.py", line 231, in makedirs
   makedirs(head, mode, exist_ok)
 File "c:\users\administrator\envs\p3spider\lib\os.py", line 241, in makedirs
   mkdir(name, mode)
FileNotFoundError: [WinError 3] 系统找ä¸åˆ°æŒ‡å®šçš„路径。: 'c:\\users\\admini~1\\appdata\\local\\temp\\articlespider-1512384126-2rpi5uvj.egg\\ArticleSpider'

写回答

2回答

SillyGGGG

2018-02-22

遇到同样的问题!请问怎么解决!

0
0

一一倾

提问者

2017-12-05

此问题已解决,要注意是在哪里运行的scrapyd命令

0
7
慕神7119266
不是很懂应该怎么改,可以私信吗?微信ps926413
2019-03-14
共7条回复

Scrapy打造搜索引擎 畅销4年的Python分布式爬虫课

带你彻底掌握Scrapy,用Django+Elasticsearch搭建搜索引擎

5795 学习 · 6290 问题

查看课程