今天在安装pyspider的时候,在启动pyspider时,报了下面的错误

from .webdav import dav_app
  File "/home/longjin/anaconda3/envs/pachong/lib/python3.6/site-packages/pyspider/webui/webdav.py", line 216, in <module>
    dav_app = WsgiDAVApp(config)
  File "/home/longjin/anaconda3/envs/pachong/lib/python3.6/site-packages/wsgidav/wsgidav_app.py", line 134, in __init__
    _check_config(config)
  File "/home/longjin/anaconda3/envs/pachong/lib/python3.6/site-packages/wsgidav/wsgidav_app.py", line 118, in _check_config
    raise ValueError("Invalid configuration:\n  - " + "\n  - ".join(errors))
ValueError: Invalid configuration:
  - Deprecated option 'domaincontroller': use 'http_authenticator.domain_controller' instead.

解决方案就是找到python安装目录下的/lib/python3.6/site-packages/pyspider/webui/webdav.py

找到209行,把209行的代码改成下面这个

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

然后就可以正常使用了

你也可能喜欢

发表评论