Skip to content

fix(deps): include Telegram webhook extras in messaging installs#4961

Closed
bg-l2norm wants to merge 1 commit into
NousResearch:mainfrom
bg-l2norm:fix/issue-4915-telegram-webhooks
Closed

fix(deps): include Telegram webhook extras in messaging installs#4961
bg-l2norm wants to merge 1 commit into
NousResearch:mainfrom
bg-l2norm:fix/issue-4915-telegram-webhooks

Conversation

@bg-l2norm

Copy link
Copy Markdown
Contributor

Summary

Fix Docker/all-install Telegram webhook startup failure by including python-telegram-bot webhook extras in messaging dependencies.

Root cause

The Docker image installs Hermes with:

  • pip install -e ".[all]"

[all] includes the messaging extra from pyproject.toml, which previously depended on:

  • python-telegram-bot>=22.6,<23

That installs PTB without optional webhook dependencies. When Hermes uses Telegram webhook mode, PTB raises:

RuntimeError: To use start_webhook, PTB must be installed via pip install "python-telegram-bot[webhooks]".

Changes

  • pyproject.toml
    • messaging: python-telegram-bot -> python-telegram-bot[webhooks] (same version range)
  • requirements.txt (convenience file aligned with canonical deps)
    • python-telegram-bot>=20.0 -> python-telegram-bot[webhooks]>=22.6
  • uv.lock
    • refreshed to capture the webhook extra dependency graph (includes tornado).

Repro / verification

In an isolated venv:

  1. With python-telegram-bot (no extras), Updater.start_webhook(...) raises the exact missing-webhooks RuntimeError.
  2. After installing python-telegram-bot[webhooks], that specific RuntimeError is gone.

Closes #4915

@teknium1

teknium1 commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Merged via PR #5288 (consolidated bugfix salvage). Your commit(s) were cherry-picked onto current main with your authorship preserved in git log. Thanks @bg-l2norm for the fix!

@teknium1 teknium1 closed this Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Setup]: Docker image nousresearch/hermes-agent:latest is missing Telegram webhook dependency (python-telegram-bot[webhooks])

2 participants