Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #54621

Re: How To Build Scrapy Environment

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'tutorial': 0.03; 'twisted,': 0.07; '22,': 0.09; '__init__': 0.09; 'assuming': 0.09; 'exec': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'snippet': 0.09; '{},': 0.09; 'subject:How': 0.10; '23,': 0.16; '66,': 0.16; 'args,': 0.16; 'cmd,': 0.16; 'fname,': 0.16; 'nameerror:': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'why,': 0.16; 'wrote:': 0.18; 'module': 0.19; 'import': 0.22; 'install': 0.23; 'header:User-Agent:1': 0.23; 'error': 0.23; '31,': 0.24; 'tells': 0.24; 'shown': 0.26; 'skip:" 30': 0.26; 'defined': 0.27; 'skip:" 20': 0.27; 'skip:_ 20': 0.27; 'header:X -Complaints-To:1': 0.27; 'forgot': 0.30; 'code': 0.31; 'file': 0.32; 'class': 0.32; 'probably': 0.32; 'skip:c 30': 0.32; 'run': 0.32; '(most': 0.33; 'skip:_ 10': 0.34; 'skip:d 20': 0.34; 'skip:s 30': 0.35; 'skip:" 50': 0.36; 'url:org': 0.36; 'to:addr:python- list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'first': 0.61; 'name': 0.63; 'subject:Build': 0.68; '88,': 0.84; 'url:latest': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Peter Otten <__peter__@web.de>
Subject Re: How To Build Scrapy Environment
Date Mon, 23 Sep 2013 10:37:22 +0200
Organization None
References <1dad0f6e-0241-4892-ad32-afb2097f09a3@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Gmane-NNTP-Posting-Host p5084801a.dip0.t-ipconnect.de
User-Agent KNode/4.7.3
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.256.1379925407.18130.python-list@python.org> (permalink)
Lines 68
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1379925407 news.xs4all.nl 15981 [2001:888:2000:d::a6]:39037
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:54621

Show key headers only | View raw


YetToCome wrote:

> I have already install Twisted, zope.interface, w3lib, libxml2, etc,but it
> still can not be built,here is the error message:
> 
> Traceback (most recent call last):
>   File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
>     "__main__", fname, loader, pkg_name)
>   File "C:\Python27\lib\runpy.py", line 72, in _run_code
>     exec code in run_globals
>   File "C:\Python27\lib\site-packages\scrapy\cmdline.py", line 167, in
>   <module>
>     execute()
>   File "C:\Python27\lib\site-packages\scrapy\cmdline.py", line 142, in
>   execute
>     _run_print_help(parser, _run_command, cmd, args, opts)
>   File "C:\Python27\lib\site-packages\scrapy\cmdline.py", line 88, in
>   _run_print
> _help
>     func(*a, **kw)
>   File "C:\Python27\lib\site-packages\scrapy\cmdline.py", line 149, in
>   _run_comm
> and
>     cmd.run(args, opts)
>   File "C:\Python27\lib\site-packages\scrapy\commands\crawl.py", line 47,
>   in run
>     crawler = self.crawler_process.create_crawler()
>   File "C:\Python27\lib\site-packages\scrapy\crawler.py", line 142, in
>   create_cr
> awler
>     self.crawlers[name] = Crawler(self.settings)
>   File "C:\Python27\lib\site-packages\scrapy\crawler.py", line 23, in
>   __init__
>     self.spiders = spman_cls.from_crawler(self)
>   File "C:\Python27\lib\site-packages\scrapy\spidermanager.py", line 35,
>   in from
> _crawler
>     sm = cls.from_settings(crawler.settings)
>   File "C:\Python27\lib\site-packages\scrapy\spidermanager.py", line 31,
>   in from
> _settings
>     return cls(settings.getlist('SPIDER_MODULES'))
>   File "C:\Python27\lib\site-packages\scrapy\spidermanager.py", line 22,
>   in __in
> it__
>     for module in walk_modules(name):
>   File "C:\Python27\lib\site-packages\scrapy\utils\misc.py", line 66, in
>   walk_mo
> dules
>     submod = __import__(fullpath, {}, {}, [''])
>   File "blog_crawl\spiders\dmoz_spider.py", line 1, in <module>
>     class DmozSpider(BaseSpider):
> NameError: name 'BaseSpider' is not defined
> 
> someone tells me why, pls

Assuming you are working your way through the tutorial at

http://doc.scrapy.org/en/latest/intro/tutorial.html#our-first-spider

you probably forgot to import the BaseSpider class with

from scrapy.spider import BaseSpider

as shown in the code snippet in the "Our first Spider" section of the 
tutorial.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How To Build Scrapy Environment YetToCome <wjw15129@gmail.com> - 2013-09-23 01:12 -0700
  Re: How To Build Scrapy Environment Peter Otten <__peter__@web.de> - 2013-09-23 10:37 +0200
    Re: How To Build Scrapy Environment YetToCome <wjw15129@gmail.com> - 2013-09-23 01:56 -0700
      Re: How To Build Scrapy Environment Peter Otten <__peter__@web.de> - 2013-09-23 11:25 +0200
        Re: How To Build Scrapy Environment YetToCome <wjw15129@gmail.com> - 2013-09-23 03:11 -0700
  Re: How To Build Scrapy Environment YetToCome <wjw15129@gmail.com> - 2013-09-23 01:55 -0700

csiph-web