错误所有模块Scrapy

时间:2014-09-01 16:37:44

标签: python scrapy

我不知道,然后出现了这个错误,但现在我无法运行任何Scrapy蜘蛛。

Traceback (most recent call last):
  File "C:/Users/Eugene/Scrapy/Test/Test_news.py", line 37, in <module>
    crawler.configure()
  File "C:\Python27\lib\site-packages\scrapy\crawler.py", line 46, in configure
    self.extensions = ExtensionManager.from_crawler(self)
  File "C:\Python27\lib\site-packages\scrapy\middleware.py", line 50, in from_crawler
    return cls.from_settings(crawler.settings, crawler)
  File "C:\Python27\lib\site-packages\scrapy\middleware.py", line 29, in from_settings
    mwcls = load_object(clspath)
  File "C:\Python27\lib\site-packages\scrapy\utils\misc.py", line 42, in load_object
    raise ImportError("Error loading object '%s': %s" % (path, e))
ImportError: Error loading object 'scrapy.webservice.WebService': No module named parse

有人有任何想法吗?

2 个答案:

答案 0 :(得分:1)

如果之前有效,请尝试重新安装:

pip uninstall Scrapy

然后:

pip install -U Scrapy

答案 1 :(得分:0)

假设您有sudo,我每次都会在全新的ubuntu上安装Scrapy。

sudo apt-get update
sudo apt-get install -y libffi-dev python-dev python-pip python-lxml
sudo pip install scrapy 

另外,请确保您不会处于一个奇怪的情况,您恰好位于名为scrapy的自定义文件夹中,或者您创建的某些本地文件与scrapy正在使用的命名空间冲突.... 在一个简短的句子中,可以转到/tmp,然后尝试scrapy startproject myproject并尝试在不使用任何有争议的名称的情况下复制代码,看看问题是否会消失。