Symptom
After docker pull of nousresearch/hermes-agent:latest, Telegram connect fails and retries. The log repeats Failed to connect to Telegram: 'HTTPXRequest' object attribute 'do_request' is read-only. The pull request calls this an AttributeError.
Evidence what you'll see
- The report's loop is
Discovering Telegram API fallback IPs via DNS-over-HTTPSand then thedo_requestline, four times, with no successful connect. - A comment the same day shows
telegram failed to connectfor more than one profile, thenGateway running with 1 platform(s), while the API server stays up.
Why it happens
Python 3.13 added __slots__ = () on contextlib.AbstractAsyncContextManager, so PTB 22.6's HTTPXRequest has no instance __dict__. _instrument_polling_request assigned request.do_request and that assignment stopped every connect. Python 3.11 and 3.12 were unaffected. The official image named in the pull request is python3.13-trixie. Pull request 64574 sets request.__class__ to a slots-safe subclass that overrides do_request.
Affected versions
The report is Debian 13, Hermes version latest, Python version left blank, after docker pull and docker compose up -d. The pull request names Python 3.13 with PTB 22.6, including the official image python3.13-trixie.
Fix steps
0 of 2 done
Your check marks stay in this browser only.
How to check it worked
- Restart the gateway. The log no longer shows the
do_requestread-only line, and Telegram messages arrive. The pull request says a Python 3.13 environment with PTB 22.6 connects after the subclass re-tag.
If it still fails
- The pull request says Python 3.11 and 3.12 were unaffected. Those versions are not this failure.
- A comment on 14 Jul 2026 describes a local edit that returns the request unchanged instead of assigning
do_request. That edit is not the merged change. The linked issue does not describe a remaining failure after pull request 64574.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it