httpx/httpcore 内脏某处的异常

问题描述

我有一个抓取引擎,它使用任何代理列表,并在代理不起作用时重试。所以有很多代理超时、连接被拒绝、证书错误等。从 aiohttp 切换到 httpx 后,我有很多内部异常似乎没有阻碍,只是垃圾邮件日志。

16:47:37: Future exception was never retrieved
future: <Future finished exception=brokenResourceError()>
Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/selector_events.py",line 856,in _read_ready__data_received
    data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/pooh/venv39/lib/python3.9/site-packages/httpcore/_backends/anyio.py",line 60,in read
    return await self.stream.receive(n)
  File "/home/pooh/venv39/lib/python3.9/site-packages/anyio/_backends/_asyncio.py",line 1095,in receive
    raise self._protocol.exception
anyio.brokenResourceError

也许开发人员的某些人可以阐明它是什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)