Scrapy运行异常, in implements raise TypeError(_ADVICE_ERROR % 'implementer') TypeError: Class advice impossible in Python3

新xiao竹 发布于 2016/04/12 21:54
阅读 1K+
收藏 0

执行scrapy 爬虫时报错:(环境python3.5;

Twisted-16.1.1rc1.tar.bz2;

zope.interface-4.1.3-py3.3-win32.egg

pyOpenSSL-16.0.0.tar.gz

pypiwin32-219-cp35-none-win32.whl)

_____________________________________________

G:\git_oschina\scrapy_test\scrapy_testdemo>scrapy crawl dmoz
Traceback (most recent call last):
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\Scripts\scrapy.exe\__main__.py", line 5, in <module>
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\site-packages\scrapy\__init__.py", line 34, in <module>
    from scrapy.spiders import Spider
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\site-packages\scrapy\spiders\__init__.py", line 10, in <module>
    from scrapy.http import Request
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\site-packages\scrapy\http\__init__.py", line 11, in <module>
    from scrapy.http.request.form import FormRequest
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\site-packages\scrapy\http\request\form.py", line 14, in <module>
    from scrapy.utils.response import get_base_url
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\site-packages\scrapy\utils\response.py", line 11, in <module>
    from twisted.web import http
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\twisted\web\http.py", line 98, in <module>
    from twisted.internet import interfaces, reactor, protocol, address
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\twisted\internet\reactor.py", line 38, in <module>
    from twisted.internet import default
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\twisted\internet\default.py", line 56, in <module>
    install = _getInstallFunction(platform)
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\twisted\internet\default.py", line 50, in _getInstallFunction
    from twisted.internet.selectreactor import install
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\twisted\internet\selectreactor.py", line 47, in <module>
    from twisted.internet.win32eventreactor import _ThreadedWin32EventsMixin
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\twisted\internet\win32eventreactor.py", line 81, in <module>
    class Win32Reactor(posixbase.PosixReactorBase):
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\twisted\internet\win32eventreactor.py", line 121, in Win32Reactor
    implements(IReactorFDSet, IReactorWin32Events)
  File "c:\users\administrator\appdata\local\programs\python\python35-32\lib\site-packages\zope.interface-4.1.3-py3.5-win32.egg\zope\interface\declarations.py"
, line 412, in implements
    raise TypeError(_ADVICE_ERROR % 'implementer')
TypeError: Class advice impossible in Python3.  Use the @implementer class decorator instead.

----------------------

尝试过降低zope.interface 版本,一直降到4.0.5,也没解决。刚入手python3.5 不久,搭建scrapy后各种问题,这难道要避我回2.7?




加载中
0
fkkeee
fkkeee

参考使用文档:http://scrapy.readthedocs.org/en/latest/intro/install.html#intro-install-platform-notes

参考github项目:https://github.com/scrapy/scrapy/tree/1.0

这个项目到最新版1.0(包括之前的 0.24/0.25),都是在2.7 的版本上运行。

退回2.7.6以上版本保平安。等以后完美支持3.5了后再来折疼。


0
新xiao竹
恩,谢谢了。。用3.x 过后感觉好多东西版本根本上阿!
返回顶部
顶部