Pyspider all 出現的坑


SyntaxError: invalid syntax

  • async和await從 python3.7 開始已經加入保留關鍵字中. 參考: What’s New In Python 3.7, 所以async不能作為函數的參數名.
  • 修改/Library/anaconda3/lib/python3.7/site-packages/pyspider路徑下的python文件中的async為shark(全部替換)
    • 1.run.py
    • 2.fetcher\tornado_fetcher.py
    • 3.webui\app.py

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

  • 原因是因為WsgiDAV發布了版本 pre-release 3.x。
  • 解決辦法
    • 在安裝包中找到pyspider的資源包,然后找到webui文件里面的webdav.py文件打開,修改第209行即可。

'domaincontroller': NeedAuthController(app),

修改為:

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

然后再執行pyspider all就能夠通過http://localhost:5000打開頁面了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM