问题描述
我正在尝试使用 grequests 从 URL 获取一些数据,然后使用多处理池处理数据。多处理池启动时出现以下错误
File "src\\gevent\\_hub_primitives.py",line 317,in gevent._gevent_c_hub_primitives.wait_on_socket
File "src\\gevent\\_hub_primitives.py",line 322,line 313,in gevent._gevent_c_hub_primitives._primitive_wait
File "src\\gevent\\_hub_primitives.py",line 314,line 46,in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait
File "src\\gevent\\_hub_primitives.py",line 55,in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait
File "src\\gevent\\_waiter.py",line 154,in gevent._gevent_c_waiter.Waiter.get
File "src\\gevent\\_greenlet_primitives.py",line 61,in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src\\gevent\\_greenlet_primitives.py",line 65,in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src\\gevent\\_gevent_c_greenlet_primitives.pxd",line 35,in gevent._gevent_c_greenlet_primitives._greenlet_switch
greenlet.error: cannot switch to a different thread
任何帮助将不胜感激。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)