zoukankan      html  css  js  c++  java
  • python3.7与pyspider的坑

    网络上安装pyspider的坑有很多,但都不如我今天的大,困扰了我几天,终于解决了

    Traceback (most recent call last):
      File "/ffk_learn/software/Python-3.7.0/ffk_py/bin/pyspider", line 7, in <module>
        from pyspider.run import main
      File "/ffk_learn/software/Python-3.7.0/ffk_py/lib/python3.7/site-packages/pyspider/run.py", line 231
        async=True, get_object=False, no_input=False):
            ^
    SyntaxError: invalid syntax

    一直抱着个错误,后来才发现,是因为async从python3.7开始不能用作参数名了,将所有脚本里面的async换一个名字即可,当然最好还是要pyspider的大佬更新下pyspider.脚本不多,一共两个脚本

    1 ffk_py/lib/python3.7/site-packages/pyspider/run.py

    2 ffk_py/lib/python3.7/site-packages/pyspider/fetcher/tornado_fetcher.py 

    ValueError: Invalid configuration: - Deprecated option 'domaincontroller': use 'http_authenticator

    安装完爬虫框架pyspider之后,使用pyspider all 命令,输入http://localhost:5000运行就出现上述错误

    原因是因为WsgiDAV发布了版本 pre-release 3.x。

    解决方法如下:

    在安装包中找到pyspider的资源包,然后找到webui文件里面的webdav.py文件打开,修改第209行即可。

    'domaincontroller': NeedAuthController(app),

    修改为:

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

    然后再执行pyspider all就能够通过http://localhost:5000打开页面了。

  • 相关阅读:
    ubuntu下如何更改mysql数据存放路径
    collection_select
    发现星期六日的电视比较好看
    rails
    系统抢救10.04
    劫后重生,痛定思痛,ubuntu 10.04=>10.10
    随机查询N条记录
    which linux your like
    kindeditor的使用
    array
  • 原文地址:https://www.cnblogs.com/liugp/p/10859237.html
Copyright © 2011-2022 走看看