Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error to execute python-scrappy module

I am getting the error while executing the python-scrappy sample module

My Stacktrace:

 gridlex@gridlex-laptop:~/Documents/tutorial$ scrapy crawl tutorial/dmoz

 /usr/lib/python2.6/dist-packages/zope/__init__.py:3: UserWarning: Module twisted was   already imported from /usr/lib/python2.6/dist-packages/twisted/__init__.pyc, but /usr/local/  lib/python2.6/dist-packages is being added to sys.path
 import pkg_resources
 2011-12-29 22:47:04+0530 [scrapy] INFO: Scrapy 0.14.0.2841 started (bot: tutorial)
 Traceback (most recent call last):
 File "/usr/local/bin/scrapy", line 4, in <module>
   execute()
 File "/usr/local/lib/python2.6/dist-packages/scrapy/cmdline.py", line 132, in execute
   _run_print_help(parser, _run_command, cmd, args, opts)
 File "/usr/local/lib/python2.6/dist-packages/scrapy/cmdline.py", line 97, in       _run_print_help
 func(*a, **kw)
File "/usr/local/lib/python2.6/dist-packages/scrapy/cmdline.py", line 139, in _run_command
  cmd.run(args, opts)
File "/usr/local/lib/python2.6/dist-packages/scrapy/commands/crawl.py", line 43, in run
   spider = self.crawler.spiders.create(spname, **opts.spargs)
File "/usr/local/lib/python2.6/dist-packages/scrapy/command.py", line 34, in crawler
   self._crawler.configure()
File "/usr/local/lib/python2.6/dist-packages/scrapy/crawler.py", line 34, in configure
   self.extensions = ExtensionManager.from_crawler(self)
File "/usr/local/lib/python2.6/dist-packages/scrapy/middleware.py", line 48, in   from_crawler
   return cls.from_settings(crawler.settings, crawler)
File "/usr/local/lib/python2.6/dist-packages/scrapy/middleware.py", line 29, in   from_settings
  mwcls = load_object(clspath)
File "/usr/local/lib/python2.6/dist-packages/scrapy/utils/misc.py", line 39, in load_object
  raise ImportError, "Error loading object '%s': %s" % (path, e)
ImportError: Error loading object 'scrapy.telnet.TelnetConsole': No module named conch

Just I had the sample o execute the sample scrapping using python-scrappy module

I used this example to execute it http://doc.scrapy.org/en/0.14/intro/tutorial.html#intro-tutorial

like image 963
Nava Avatar asked Dec 06 '22 17:12

Nava


2 Answers

Debian or Ubuntu (9.04 or older)

If you’re running Debian Linux, run the following command as root:

apt-get install python-twisted python-libxml2 python-pyopenssl python-simplejson

Then:

easy_install -U w3lib

And then follow the instructions in Install Scrapy.

like image 59
Yogo Avatar answered Dec 27 '22 00:12

Yogo


I think you need to install twisted because the conch module that isn't found is probably twisted.conch.

like image 29
jcollado Avatar answered Dec 27 '22 02:12

jcollado