python - 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
也许开发人员中的某个人可以阐明它是什么?
解决方案
推荐阅读
- flutter - Flutter:SystemChrome.setEnabledSystemUIOverlays 值何时会覆盖后续的屏幕覆盖值
- php - ajax like 按钮成功不正确
- c# - jQuery数据表在foreach循环加载数据时抛出错误
- security - HWID 保护和克隆
- javascript - ForEach 循环 PHP 中的倒数计时器
- python - 为什么 spaCy 依赖符号定义“case”和“compound”不能像 spacy.symbols 包中的“nsubj”一样被识别?
- javascript - Dropzone 实例适用于第一个元素,但不适用于克隆的元素 (Vue)
- excel - Excel VBA自动查找数字的上限和下限
- java - 接口如何为同一方法实现两种不同的算法
- python - 我如何提取(.find())没有类的div(或span)