hermes - 💡(How to fix) Fix bug: ModuleNotFoundError 'hermes_cli.dashboard_auth' when running (PyPI install) [1 pull requests]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Traceback (most recent call last): File "/home/radya/.local/bin/hermes", line 10, in <module> sys.exit(main()) File "hermes_cli/main.py", line 14303, in main args.func(args) File "hermes_cli/main.py", line 10937, in cmd_dashboard from hermes_cli.web_server import start_server File "hermes_cli/web_server.py", line 4822, in <module> from hermes_cli.dashboard_auth.routes import router as _dashboard_auth_router ModuleNotFoundError: No module named "hermes_cli.dashboard_auth"

Root Cause

The hermes_cli/dashboard_auth/ package exists in the source tree on main but is not included in the PyPI 0.15.2 sdist/wheel.

Meanwhile, hermes_cli/web_server.py in the same PyPI package already has multiple top-level imports from hermes_cli.dashboard_auth:

# web_server.py line 4822 (module-level, runs on import)
from hermes_cli.dashboard_auth.routes import router as _dashboard_auth_router

Other lazy references at runtime:

  • hermes_cli.dashboard_auth.middleware.gated_auth_middleware
  • hermes_cli.dashboard_auth.list_providers
  • hermes_cli.dashboard_auth.audit.AuditEvent
  • hermes_cli.dashboard_auth.ws_tickets.mint_ticket
  • hermes_cli.dashboard_auth.prefix.normalise_prefix

Fix Action

Fixed

Code Example

Traceback (most recent call last):
  File "/home/radya/.local/bin/hermes", line 10, in <module>
    sys.exit(main())
  File "hermes_cli/main.py", line 14303, in main
    args.func(args)
  File "hermes_cli/main.py", line 10937, in cmd_dashboard
    from hermes_cli.web_server import start_server
  File "hermes_cli/web_server.py", line 4822, in <module>
    from hermes_cli.dashboard_auth.routes import router as _dashboard_auth_router
ModuleNotFoundError: No module named "hermes_cli.dashboard_auth"

---

# web_server.py line 4822 (module-level, runs on import)
from hermes_cli.dashboard_auth.routes import router as _dashboard_auth_router

---

# Confirmed by downloading the sdist from PyPI:
curl -sL "https://pypi.org/packages/source/h/hermes-agent/hermes_agent-0.15.2.tar.gz" | tar tz | grep dashboard_auth
#  (empty, no matches)

# But web_server.py in the same tarball already references it:
grep dashboard_auth hermes_cli/web_server.py
# → multiple hits
RAW_BUFFERClick to expand / collapse

Bug Description

Running hermes dashboard after a PyPI install of hermes-agent==0.15.2 crashes immediately with:

Traceback (most recent call last):
  File "/home/radya/.local/bin/hermes", line 10, in <module>
    sys.exit(main())
  File "hermes_cli/main.py", line 14303, in main
    args.func(args)
  File "hermes_cli/main.py", line 10937, in cmd_dashboard
    from hermes_cli.web_server import start_server
  File "hermes_cli/web_server.py", line 4822, in <module>
    from hermes_cli.dashboard_auth.routes import router as _dashboard_auth_router
ModuleNotFoundError: No module named "hermes_cli.dashboard_auth"

Root Cause

The hermes_cli/dashboard_auth/ package exists in the source tree on main but is not included in the PyPI 0.15.2 sdist/wheel.

Meanwhile, hermes_cli/web_server.py in the same PyPI package already has multiple top-level imports from hermes_cli.dashboard_auth:

# web_server.py line 4822 (module-level, runs on import)
from hermes_cli.dashboard_auth.routes import router as _dashboard_auth_router

Other lazy references at runtime:

  • hermes_cli.dashboard_auth.middleware.gated_auth_middleware
  • hermes_cli.dashboard_auth.list_providers
  • hermes_cli.dashboard_auth.audit.AuditEvent
  • hermes_cli.dashboard_auth.ws_tickets.mint_ticket
  • hermes_cli.dashboard_auth.prefix.normalise_prefix

Verification

# Confirmed by downloading the sdist from PyPI:
curl -sL "https://pypi.org/packages/source/h/hermes-agent/hermes_agent-0.15.2.tar.gz" | tar tz | grep dashboard_auth
# → (empty, no matches)

# But web_server.py in the same tarball already references it:
grep dashboard_auth hermes_cli/web_server.py
# → multiple hits

The pyproject.toml has "hermes_cli.*" in [tool.setuptools.packages.find] include, which should cover subpackages. The dashboard_auth/ directory was likely added to the source tree after the sdist was built but web_server.py was already updated with the imports.

Environment

  • hermes-agent version: 0.15.2 (PyPI)
  • Python: 3.11
  • Install method: uv pip install hermes-agent
  • OS: Linux (Ubuntu)

Expected Behavior

hermes dashboard should start the web dashboard without import errors.

Suggested Fix

Either:

  1. Release a new version that includes the hermes_cli/dashboard_auth/ package in the distribution, or
  2. Make the import lazy/conditional in web_server.py so dashboard starts gracefully without the auth module

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING