Python-scrappy module runtime error

I get an error while executing python-scrappy sample module

My stack:

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 

I just had a sample o execute a sample sample using the python-scrappy module

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

+4
source share
2 answers

I think you need to install twisted , because the conch module that was not found is probably twisted.conch .

+2
source

Debian or Ubuntu (9.04 and later)

If you are using Debian Linux, run the following command as root:

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

Then:

 easy_install -U w3lib 

Then follow the instructions in the Session Setup section.

+13
source

Source: https://habr.com/ru/post/1388494/


All Articles