*This is my external python script for calling the spider*

from twisted.internet import reactor
from scrapy.crawler import Crawler
from scrapy import log, signals
from pymongo import MongoClient
from scraping_goodreads.spiders.goodreadSpider import 
ScrapingGoodreadsSpider
from scrapy.utils.project import get_project_settings

Client = MongoClient()
db = Client.scraped_data
start_urls = "http://www.goodreads.com/quotes";
if db.search_collection.find_one({ 'url': start_urls }) != None:
spider = ScrapingGoodreadsSpider(domain='goodreads.com')
settings = get_project_settings()
crawler = Crawler(settings)
crawler.signals.connect(reactor.stop, signal=signals.spider_closed)
crawler.configure()
crawler.crawl(spider)
crawler.start()
log.start()
reactor.run()
else:
print('return from cache') 



*But i'm getting error.*


Traceback (most recent call last):
  File "as.py", line 16, in <module>
    crawler.configure()
  File "/usr/local/lib/python2.7/dist-packages/scrapy/crawler.py", line 46, 
in configure
    self.extensions = ExtensionManager.from_crawler(self)
  File "/usr/local/lib/python2.7/dist-packages/scrapy/middleware.py", line 
50, in from_crawler
    return cls.from_settings(crawler.settings, crawler)
  File "/usr/local/lib/python2.7/dist-packages/scrapy/middleware.py", line 
29, in from_settings
    mwcls = load_object(clspath)
  File "/usr/local/lib/python2.7/dist-packages/scrapy/utils/misc.py", line 
42, in load_object
    raise ImportError("Error loading object '%s': %s" % (path, e))
ImportError: Error loading object 'scrapy.telnet.TelnetConsole': cannot 
import name scraper



Please tell me what I'm doing wrong. I'm a newbie with very little 
knowledge of python and scrapy
my scrapy version is *0.22 *and python version is *2.7*
and all other packages are up to date.

-- 
You received this message because you are subscribed to the Google Groups 
"scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to