安装pyspider后运行pyspider all后遇到的问题

简介: 安装pyspider后运行pyspider all后遇到的问题

问题1------提示无法找到包 “DispatcherMiddleware”

Traceback (most recent call last):
  File "D:\Programs\Python36\Scripts\pyspider-script.py", line 11, in <module>
    load_entry_point('pyspider==0.3.10', 'console_scripts', 'pyspider')()
  File "d:\programs\python36\lib\site-packages\pyspider\run.py", line 754, in main
    cli()
  File "d:\programs\python36\lib\site-packages\click\core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "d:\programs\python36\lib\site-packages\click\core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "d:\programs\python36\lib\site-packages\click\core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "d:\programs\python36\lib\site-packages\click\core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "d:\programs\python36\lib\site-packages\click\core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "d:\programs\python36\lib\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "d:\programs\python36\lib\site-packages\pyspider\run.py", line 497, in all
    ctx.invoke(webui, **webui_config)
  File "d:\programs\python36\lib\site-packages\click\core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "d:\programs\python36\lib\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "d:\programs\python36\lib\site-packages\pyspider\run.py", line 384, in webui
    app.run(host=host, port=port)
  File "d:\programs\python36\lib\site-packages\pyspider\webui\app.py", line 64, in run
    from werkzeug.wsgi import DispatcherMiddleware
ImportError: cannot import name 'DispatcherMiddleware'

解决方法

将C:\Python\Lib\site-packages\pyspider\webui.app.py中64行的代码进行修改

将
from werkzeug.wsgi import DispatcherMiddleware
修改为
from werkzeug.middleware.dispatcher import DispatcherMiddleware

在这里插入图片描述

问题2-----提示"Deprecated option 'domaincontroller': use 'http_authenticator.domain_controller' instead."

Traceback (most recent call last):
  File "D:\Programs\Python36\Scripts\pyspider-script.py", line 11, in <module>
    load_entry_point('pyspider==0.3.10', 'console_scripts', 'pyspider')()
  File "d:\programs\python36\lib\site-packages\pyspider\run.py", line 754, in main
    cli()
  File "d:\programs\python36\lib\site-packages\click\core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "d:\programs\python36\lib\site-packages\click\core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "d:\programs\python36\lib\site-packages\click\core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "d:\programs\python36\lib\site-packages\click\core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "d:\programs\python36\lib\site-packages\click\core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "d:\programs\python36\lib\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "d:\programs\python36\lib\site-packages\pyspider\run.py", line 497, in all
    ctx.invoke(webui, **webui_config)
  File "d:\programs\python36\lib\site-packages\click\core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "d:\programs\python36\lib\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "d:\programs\python36\lib\site-packages\pyspider\run.py", line 384, in webui
    app.run(host=host, port=port)
  File "d:\programs\python36\lib\site-packages\pyspider\webui\app.py", line 59, in run
    from .webdav import dav_app
  File "d:\programs\python36\lib\site-packages\pyspider\webui\webdav.py", line 216, in <module>
    dav_app = WsgiDAVApp(config)
  File "d:\programs\python36\lib\site-packages\wsgidav\wsgidav_app.py", line 133, in __init__
    _check_config(config)
  File "d:\programs\python36\lib\site-packages\wsgidav\wsgidav_app.py", line 117, in _check_config
    raise ValueError("Invalid configuration:\n  - " + "\n  - ".join(errors))
ValueError: Invalid configuration:
  - Deprecated option 'domaincontroller': use 'http_authenticator.domain_controller' instead.

解决方法

修改对应的配置文件

C:\Programs\Python36\Lib\site-packages\pyspider\webui\webdav.py
将第209行进行修改,如下

在这里插入图片描述

目录
相关文章
|
iOS开发 MacOS Python
Python包管理工具之poetry
之前讲了一个pipenv包管理工具,这里说另外一个poetry工具,它是一个Python 虚拟环境和依赖管理工具。还提供了打包发布的功能。
|
3月前
|
Docker Python Windows
pycharm使用fastapi/uvicorn无法reload的问题
这篇文章讨论了在PyCharm中使用FastAPI和uvicorn时遇到的无法快速重载的问题,并提供了包括降级uvicorn版本和使用命令行运行等解决方法。
pycharm使用fastapi/uvicorn无法reload的问题
|
6月前
|
移动开发 定位技术 计算机视觉
Anaconda下Python中h5py与netCDF4模块下载与安装方法
Anaconda下Python中h5py与netCDF4模块下载与安装方法
149 1
|
11月前
|
Shell Linux Python
关于Python安装Scrapy库的常见报错解决
关于Python安装Scrapy库的常见报错解决
623 0
|
监控 网络协议 Python
appium--python启动appium服务
appium--python启动appium服务
|
数据采集 存储 安全
爬虫框架Playwright在Java环境下的开发实践
爬虫框架Playwright在Java环境下的开发实践
319 0
|
Python Windows
Anaconda详细安装及安装Scrapy框架
Anaconda详细安装及安装Scrapy框架
331 0
|
JavaScript 前端开发 Ubuntu
【cypress】2. 安装Cypress(windows系统),以及cypress open报错解决。
【cypress】2. 安装Cypress(windows系统),以及cypress open报错解决。
【cypress】2. 安装Cypress(windows系统),以及cypress open报错解决。
关于python3.9安装Airtest跑脚本“jinja2”报错的问题说明
关于python3.9安装Airtest跑脚本“jinja2”报错的问题说明
1003 0
安装pyspider出现的坑
安装pyspider出现的坑