fix(gateway): add missing logger definition to prevent NameError in _all_platforms#27154
Closed
0xchainer wants to merge 2 commits into
Closed
fix(gateway): add missing logger definition to prevent NameError in _all_platforms#271540xchainer wants to merge 2 commits into
0xchainer wants to merge 2 commits into
Conversation
…all_platforms hermes_cli/gateway.py:3702 referenced logger.debug() but 'logger' was never defined in the module, causing a NameError at runtime if the try/except around discover_plugins() caught an exception. Added import logging and logger = logging.getLogger(__name__) at module level to resolve the undefined name.
This comment was marked as spam.
This comment was marked as spam.
…ousResearch#27154) Verify that the module has a logger instance with the correct name, preventing regression of the NameError fixed in a31d5af.
Contributor
|
Merged via #27246 with your authorship preserved on the substantive commits via rebase-merge. Commit Salvage notes: cherry-picked your fix + smoke test onto current |
teknium1
added a commit
that referenced
this pull request
May 17, 2026
…tors Adds release-note attribution mappings for 9 contributors from group 3: - @darvsum (PR #26766) - @hueilau (PR #26498) - @Timur00Kh (PR #27114) - @Grogger (PR #27061) - @lemassykoi (PR #27042) - @draplater (PR #26707) - @pr7426 (PR #27048) - @therahul-yo (PR #26215) - @flamiinngo (PR #27205) #27154 dropped from this batch — already landed on main as 4e9cedc.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…ousResearch#27154) Verify that the module has a logger instance with the correct name, preventing regression of the NameError fixed in a31d5af.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…tors Adds release-note attribution mappings for 9 contributors from group 3: - @darvsum (PR NousResearch#26766) - @hueilau (PR NousResearch#26498) - @Timur00Kh (PR NousResearch#27114) - @Grogger (PR NousResearch#27061) - @lemassykoi (PR NousResearch#27042) - @draplater (PR NousResearch#26707) - @pr7426 (PR NousResearch#27048) - @therahul-yo (PR NousResearch#26215) - @flamiinngo (PR NousResearch#27205) NousResearch#27154 dropped from this batch — already landed on main as 4e9cedc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hermes_cli/gateway.py:3702referencedlogger.debug()butloggerwas never defined anywhere in the module. This causes aNameErrorat runtime whenever thetry/exceptblock arounddiscover_plugins()in the_all_platforms()function catches an exception.Root Cause
The
_all_platforms()function (line 3674) is responsible for enumerating all available messaging platforms for thehermes setup gatewaymenu. It combines built-in platforms with plugin-registered ones by callingdiscover_plugins().If
discover_plugins()fails — for example, due to a corrupted plugin directory, a missing dependency, or a user-installed platform plugin with a syntax error — theexcept Exception as e:block at line 3703 attempts to log the failure: