scrapyd找不到文件,win10,linux运行没问题,scrapyd部署后就不行了?

来源:1-1 python分布式爬虫打造搜索引擎简介

慕神7119266

2019-03-11

2019-03-11 10:00:41 [scrapy.utils.log] INFO: Scrapy 1.6.0 started (bot: china_canton_railway)
2019-03-11 10:00:41 [scrapy.utils.log] INFO: Versions: lxml 3.7.2.0, libxml2 2.9.4, cssselect 1.0.3, parsel 1.5.1, w3lib 1.20.0, Twisted 18.9.0, Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 12:22:00) - [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)], pyOpenSSL 16.2.0 (OpenSSL 1.1.1b 26 Feb 2019), cryptography 2.6.1, Platform Linux-3.10.0-862.14.4.el7.x86_64-x86_64-with-centos-7.5.1804-Core
2019-03-11 10:00:41 [scrapy.crawler] INFO: Overridden settings: {‘BOT_NAME’: ‘china_canton_railway’, ‘COMMANDS_MODULE’: ‘china_canton_railway.commands’, ‘DOWNLOAD_DELAY’: 0.3, ‘LOG_FILE’: ‘logs/china_canton_test/guangzhou_erqi_spider/78b6048e43a111e980a3fa163ea6ef8a.log’, ‘NEWSPIDER_MODULE’: ‘china_canton_railway.spiders’, ‘SPIDER_MODULES’: [‘china_canton_railway.spiders’]}
2019-03-11 10:00:41 [scrapy.extensions.telnet] INFO: Telnet Password: 04ecbfec93b2c400
2019-03-11 10:00:41 [scrapy.middleware] INFO: Enabled extensions:
[‘scrapy.extensions.corestats.CoreStats’,
‘scrapy.extensions.telnet.TelnetConsole’,
‘scrapy.extensions.memusage.MemoryUsage’,
‘scrapy.extensions.logstats.LogStats’]
2019-03-11 10:00:41 [twisted] CRITICAL: Unhandled error in Deferred:
2019-03-11 10:00:41 [twisted] CRITICAL:
Traceback (most recent call last):
File “/usr/local/anaconda3/lib/python3.6/site-packages/twisted/internet/defer.py”, line 1418, in _inlineCallbacks
result = g.send(result)
File “/usr/local/anaconda3/lib/python3.6/site-packages/scrapy/crawler.py”, line 79, in crawl
self.spider = self._create_spider(*args, **kwargs)
File “/usr/local/anaconda3/lib/python3.6/site-packages/scrapy/crawler.py”, line 102, in _create_spider
return self.spidercls.from_crawler(self, *args, **kwargs)
File “/usr/local/anaconda3/lib/python3.6/site-packages/scrapy/spiders/init.py”, line 51, in from_crawler
spider = cls(*args, **kwargs)
File “/tmp/china_canton_test-1552269621-sk6exnce.egg/china_canton_railway/spiders/guagzhou_erqi.py”, line 10, in init
File “/tmp/china_canton_test-1552269621-sk6exnce.egg/china_canton_railway/spiders/common_spider.py”, line 27, in init
File “/tmp/china_canton_test-1552269621-sk6exnce.egg/utils/city_data.py”, line 6, in get_city_dict
FileNotFoundError: [Errno 2] No such file or directory: ‘city_id.txt’

写回答

1回答

bobby

2019-03-13

这里报错说是文件夹不存在 是否路径错了呢

0
3
bobby
回复
慕神7119266
你加我qq 442421039
2019-03-14
共3条回复

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

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

5795 学习 · 6290 问题

查看课程