原创

pyspider all 启动失败:ValueError: Invalid configuration

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-NC-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://itrhx.blog.csdn.net/article/details/100856985

执行 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

文章最后发布于: 2019-09-15 16:41:06
展开阅读全文
0 个人打赏
私信求帮助
曾参与过风云系列卫星、碳卫星、子午工程、嫦娥等项目的数据处理工作;有超10年大型项目的开发经验。 专栏收入了作者为Python爱好者精心打造的多篇文章,从小白入门学习的基础语法、基础模块精讲等内容外,还提出了“Python语感训练”的概念和方法,不仅为初学者提供了进阶之路,有一定基础的程序员亦可从中受益。后续,本专栏还将加入2D/3D应用开发、数据处理、实战项目等精品内容,敬请期待。
xufive ¥3.80 1632人订阅

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 成长之路 设计师: Amelia_0503

分享到微信朋友圈

×

扫一扫,手机浏览