系统:Win10 1903
Python版本:3.7.4
1.安装之后初次运行pyspider all出如下问题时:
原因: 在python3.5当中async被加入关键字
解决:将Python\lib\site-packages\pyspider\run.py
Python\Lib\site-packages\pyspider\webui\app.py当中含有async的全部字符替换为async_mode
2.遇如下问题时:
解决:
若没有安装phantomjs则先安装phantomjs,官网下载
修改pyspider/webui/webdav.py中第203行:
config = DEFAULT_CONFIG.copy()
config.update({
'mount_path': '/dav',
'provider_mapping': {
'/': ScriptProvider(app)
},
#'domaincontroller': NeedAuthController(app),
'http_authenticator': {
'HTTPAuthenticator':NeedAuthController(app),
},
'verbose': 1 if app.debug else 0,
'dir_browser': {'davmount': False,
#'enable': True,
'msmount': False,
'response_trailer': ''},
})
dav_app = WsgiDAVApp(config)
再次运行pyspider若出现如下问题
因为pyspider源码版本缘故,所以将版本降下来,将wsgidav替换为2.4.1
python -m pip uninstall wsgidav
python -m pip install wsgidav ==2.4.1
若降低版本后依旧报错,继续降低其版本
注意:降低版本不能低于0.15版本,因为我们的pyspider要求大于0.15版本以上
python -m pip uninstall werkzeug
python -m pip install werkzeug==0.16.1
最后再次运行pyspider all成功
浏览器访问web localhost:5000页面正常