In **SearchResultPages.py** replace
a-n-u-18 opened this issue · 1 comments
In SearchResultPages.py replace
SearchEngines import SearchEngines
with
from AadhaarSearchEngine.common.SearchEngines import SearchEngines
Originally posted by @rshiva in #6 (comment)
Got the following error after the change as said above . Kindly bear with me if this is a silly mistake because I'm just a beginner.
Unhandled error in Deferred:
2019-05-01 10:41:31 [twisted] CRITICAL: Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/scrapy/crawler.py", line 172, in crawl
return self._crawl(crawler, *args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/scrapy/crawler.py", line 176, in _crawl
d = crawler.crawl(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py", line 1613, in unwindGenerator
return _cancellableInlineCallbacks(gen)
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py", line 1529, in _cancellableInlineCallbacks
_inlineCallbacks(None, g, status)
--- ---
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send(result)
File "/usr/local/lib/python3.7/dist-packages/scrapy/crawler.py", line 79, in crawl
self.spider = self._create_spider(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/scrapy/crawler.py", line 102, in _create_spider
return self.spidercls.from_crawler(self, *args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/scrapy/spiders/init.py", line 51, in from_crawler
spider = cls(*args, **kwargs)
File "/home/art3m1s/AadhaarSearchEngine/AadhaarSearchEngine/spiders/AadhaarSpider.py", line 24, in init
for url in page_urls:
builtins.TypeError: iter() returned non-iterator of type 'SearchResultPages'
2019-05-01 10:41:31 [twisted] CRITICAL:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send(result)
File "/usr/local/lib/python3.7/dist-packages/scrapy/crawler.py", line 79, in crawl
self.spider = self._create_spider(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/scrapy/crawler.py", line 102, in _create_spider
return self.spidercls.from_crawler(self, *args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/scrapy/spiders/init.py", line 51, in from_crawler
spider = cls(*args, **kwargs)
File "/home/art3m1s/AadhaarSearchEngine/AadhaarSearchEngine/spiders/AadhaarSpider.py", line 24, in init
for url in page_urls:
TypeError: iter() returned non-iterator of type 'SearchResultPages'
__iter__()
on python 3