pyspider all 启动失败:ValueError: Invalid configuration


执行 pyspider all 启动命令报错如下:

C:\Users\Lenovo>pyspider all
e:\python\lib\site-packages\pyspider\libs\utils.py:196: FutureWarning: timeout is not supported on your platform.
  warnings.warn("timeout is not supported on your platform.", FutureWarning)
[W 190915 16:08:38 run:413] phantomjs not found, continue running without it.
[I 190915 16:08:40 result_worker:49] result_worker starting...
[I 190915 16:08:44 processor:211] processor starting...
[I 190915 16:08:44 scheduler:647] scheduler starting...
[I 190915 16:08:44 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0
[I 190915 16:08:45 tornado_fetcher:638] fetcher starting...
[I 190915 16:08:45 scheduler:782] scheduler.xmlrpc listening on 127.0.0.1:23333
[I 190915 16:08:47 tornado_fetcher:671] fetcher exiting...
[I 190915 16:08:47 app:84] webui exiting...
[I 190915 16:08:47 scheduler:663] scheduler exiting...
[I 190915 16:08:47 result_worker:66] result_worker exiting...
[I 190915 16:08:48 processor:229] processor exiting...
Traceback (most recent call last):
  File "E:\Python\Scripts\pyspider-script.py", line 11, in <module>
    load_entry_point('pyspider==0.3.10', 'console_scripts', 'pyspider')()
  File "e:\python\lib\site-packages\pyspider\run.py", line 754, in main
    cli()
  File "e:\python\lib\site-packages\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "e:\python\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "e:\python\lib\site-packages\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "e:\python\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "e:\python\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "e:\python\lib\site-packages\click\decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "e:\python\lib\site-packages\pyspider\run.py", line 497, in all
    ctx.invoke(webui, **webui_config)
  File "e:\python\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "e:\python\lib\site-packages\click\decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "e:\python\lib\site-packages\pyspider\run.py", line 384, in webui
    app.run(host=host, port=port)
  File "e:\python\lib\site-packages\pyspider\webui\app.py", line 59, in run
    from .webdav import dav_app
  File "e:\python\lib\site-packages\pyspider\webui\webdav.py", line 216, in <module>
    dav_app = WsgiDAVApp(config)
  File "e:\python\lib\site-packages\wsgidav\wsgidav_app.py", line 135, in __init__
    _check_config(config)
  File "e:\python\lib\site-packages\wsgidav\wsgidav_app.py", line 119, in _check_config
    raise ValueError("Invalid configuration:\n  - " + "\n  - ".join(errors))
ValueError: Invalid configuration:
  - Deprecated option 'domaincontroller': use 'http_authenticator.domain_controller' instead.

原因分析:WsgiDAV 使用了新版本 pre-release 3.0.0(WsgiDAV 是一个用 Python 开发的通用 WebDAV 服务器,基于 WSGI 运行,支持 SSL)


解决方法一:将 WsgiDAV 版本降级到 2.4.1版本,使用命令 pip install wsgidav==2.4.1 安装即可


解决方法二:在 Python 安装路径下,找到 webdav.py 文件,比如我的路径为:E:\Python\Lib\site-packages\pyspider\webui\webdav.py

定位到第 209 行,找到如下代码:

'domaincontroller': NeedAuthController(app),

修改为如下代码并保存:

'http_authenticator':{
        'HTTPAuthenticator':NeedAuthController(app),
    },

01

©️2020 CSDN 皮肤主题: 数字20 设计师: CSDN官方博客 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值