pyspider报错处理

一.安装pyspider

pip install pyspider

安装详情

二.启动

pyspider all

三报错及处理

1.安装的时候出现如下的错误

"Please specify --curl-dir=/path/to/built/libcurl"
解决方法:下载安装pycurl,下载地址https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycurl
下载对应版本的whl文件,比如pycurl‑7.43.0.4‑cp38‑cp38‑win32.whl,然后安装下载文件,然后再安装就可以了。

pip3 install pycurl‑7.43.0.4‑cp38‑cp38‑win32.whl

2.启动的时候出现如下错误

async=True, get_object=False, no_input=False):

解决方法:打开python安装目录下面的\Lib\site-packages\pyspider\run.py文件,查找所有的async将其替换为async1。

3.启动出现如下错误

def __init__(self, inqueue, outqueue, poolsize=100, proxy=None, async=True):

解决方法:打开python安装目录下面的\Lib\site-packages\pyspider\fetcher\tornado_fetcher.py文件,查找所有的async将其替换为async1。

4.webUI打不开

解决方法:打开python安装目录下面的\Lib\site-packages\pyspider\webui\app.py文件,查找所有的async将其替换为async1。

5.启动出现如下错误:

- Deprecated option 'domaincontroller': use 'http_authenticator.domain_controller' instead

解决方法:打开python安装目录下面的\Lib\site-packages\pyspider\webui\webdav.py文件,查找 'domaincontroller': NeedAuthController(app),将其修改为

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

6.启动出现如下错误:

ImportError: cannot import name 'DispatcherMiddleware' from 'werkzeug.wsgi' (D:\soft\python3.8\Lib\site-packages\werkzeug\wsgi.py)

解决方法:降低wsgidav的版本

# 卸载原版本
pip uninstall wsgidav
# 安装低版本的
pip install werkzeug==0.16.1

7.启动出现如下错误:

pkg_resources.DistributionNotFound: The 'wsgidav>=2.0.0' distribution was not found and is required by pyspider

解决方法,安装 wsgidav

pip install wsgidav==2.0.0

转载于https://zhuanlan.zhihu.com/p/680557985

8AttributeError: module 'fractions' has no attribute 'gcd'

import math
文件下面将fractions.gcd()改为math.gcd()就可以了

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容