簡體   English   中英

greqests.map中的url太多會導致mac上的gevent.hub.LoopExit

[英]Too many urls in greqests.map causes gevent.hub.LoopExit only on mac

在我的代碼中( https://github.com/chembl/chembl_webresource_client/blob/master/chembl_webresource_client/web_resource.py#L98

我正在調用grequests.map

ret = grequests.map(rs, size=50)

使用rs作為URL列表。 如果該列表的大小大於某個值(我的情況是300)我得到:

File "/Library/Python/2.7/site-packages/gevent/hub.py", line 331, in switch
      return greenlet.switch(self)
gevent.hub.LoopExit: This operation would block forever

無論size參數(我嘗試了10到50之間的不同值以及完全忽略這個參數)。

這只發生在macOS上。 在Ubuntu中,任何大小的URL列表都可以使用。

我會感激任何幫助,因為這是我的小型圖書館的一個showstopper。

也許你正在遇到這個錯誤: https//github.com/gevent/gevent/issues/423

將在1.0.1中修復。

你可以嘗試分支嗎?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM