1. 程式人生 > 其它 >pip search 報錯

pip search 報錯

技術標籤:Pythonpython

近日用pip search搜尋自己寫的包時,遇到了這個報錯

ERROR: Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/base_command.py", line 224, in _main
    status = self.run(options, args)
  File "/usr/local/lib/python3.6/dist-packages/pip/_internal/commands/search.py"
, line 62, in run pypi_hits = self.search(query, options) File "/usr/local/lib/python3.6/dist-packages/pip/_internal/commands/search.py", line 82, in search hits = pypi.search({'name': query, 'summary': query}, 'or') File "/usr/lib/python3.6/xmlrpc/client.py", line 1112, in __call__ return
self.__send(self.__name, args) File "/usr/lib/python3.6/xmlrpc/client.py", line 1452, in __request verbose=self.__verbose File "/usr/local/lib/python3.6/dist-packages/pip/_internal/network/xmlrpc.py", line 46, in request return self.parse_response(response.raw) File "/usr/lib/python3.6/xmlrpc/client.py"
, line 1342, in parse_response return u.close() File "/usr/lib/python3.6/xmlrpc/client.py", line 656, in close raise Fault(**self._stack[0]) xmlrpc.client.Fault: <Fault -32500: "RuntimeError: PyPI's XMLRPC API has been temporarily disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information.">

也不知道是具體哪個部分出了問題,先總結一下獲取到的情況:

報錯資訊最後提示參閱https://status.python.org/,開啟之後發現是PyPI的問題:

Investigating - PyPI’s search backends are experiencing an outage causing the backends to timeout and fail, leading to degradation of service for the web app. Uploads and installs are currently unaffected but logged in actions and search via the web app and API access via XMLRPC are currently experiencing partial outages.
Dec 14, 09:41 UTC

Identified - We’ve identified that the issue is with excess volume to our XLMRPC search endpoint that powers pip search among other tools. We are working to try to identify patterns and prohibit abusive clients to retain service health.
Dec 14, 15:09 UTC

Update - Due to the overwhelming surges of inbound XMLRPC search requests (and growing) we will be temporarily disabling the XMLRPC search endpoint until further notice.
Dec 14, 17:30 UTC

簡單翻譯下就是PyPI的search功能的後端實現突然遭遇超大量的超時和失敗,導致通過XMLRPC的登入動作和search api全線崩潰。跟蹤之後發現有人走XMLRPC(並不能確定是“惡意”,但是一定是“濫用”)向search後端發了大的出奇的請求包導致後端崩潰,因此PyPI的search功能將被無限期封掉,直到更新。

Update - The XMLRPC Search endpoint is still disabled due to ongoing request volume. As of this update, there has been no reduction in inbound traffic to the endpoint from abusive IPs and we are unable to re-enable the endpoint, as it would immediately cause PyPI service to degrade again. We are working with the abuse contact at the owner of the IPs and trying to make contact with the maintainers of whatever tool is flooding us via other channels.
Dec 15, 20:59 UTC

最後一次更新直到12月15日,官方表示濫用XMLRPC的IP仍然在發包,而且他們仍在和發這些壞包的人進行聯絡,確認他們是否知道自己的發包部分寫錯了…
PyPICDNErr
可以看出12月14號錯誤數達到峰值
PyPICDNMissTime響應的速度也非常慢,看來有段時間沒法pip search了,轉向conda或者直接pip install


和伺服器互動 要以和為貴 要講武德 在發請求的時候 按照傳統功夫以點到為止 不要abuse 蟹蟹朋友們!