Bug Description
The google-workspace skill scripts (setup.py and google_api.py) cannot run with a standard python or python3 invocation:
-
setup.py imports hermes_constants at module level, which is only available inside the Hermes nix/pip environment — not on the system Python. The fallback (Path(__file__).resolve().parents[4]) assumes a specific directory layout that does not match the installed skill path (~/.hermes/skills/productivity/google-workspace/scripts/).
-
Neither script can install its own deps because the Hermes nix environment does not include pip or ensurepip. The _ensure_deps() auto-install in setup.py always fails with No module named pip.
-
google_api.py does NOT depend on hermes_constants (it uses os.getenv("HERMES_HOME")), creating an inconsistency between the two scripts in the same skill.
Steps to Reproduce
# System python — fails (no hermes_constants)
python3 ~/.hermes/skills/productivity/google-workspace/scripts/setup.py --check
# Hermes nix python — fails (no Google API deps, no pip)
$HERMES_PYTHON ~/.hermes/skills/productivity/google-workspace/scripts/setup.py --check
Expected Behavior
setup.py should work the same way as google_api.py — using os.getenv("HERMES_HOME") as fallback when hermes_constants is unavailable, and the Google API deps should either be bundled in the Hermes environment or the skill should document the correct invocation.
Actual Behavior
setup.py crashes with ModuleNotFoundError: No module named 'hermes_constants' on any Python that is not the Hermes package environment with the correct PYTHONPATH.
Affected Component
- Skills (skill loading, skill hub, skill guard)
Messaging Platform
N/A (CLI only)
Debug Report
N/A — this is a code-level issue visible by reading setup.py lines 31-37 vs google_api.py line 34.
Operating System
macOS (nix-managed Hermes installation)
Python Version
System: 3.9.6, Hermes env: 3.12.13
Hermes Version
0.9.0
Root Cause Analysis
setup.py lines 31-37:
try:
from hermes_constants import display_hermes_home, get_hermes_home
except ModuleNotFoundError:
HERMES_AGENT_ROOT = Path(__file__).resolve().parents[4]
if HERMES_AGENT_ROOT.exists():
sys.path.insert(0, str(HERMES_AGENT_ROOT))
from hermes_constants import display_hermes_home, get_hermes_home
The fallback re-raises the same ModuleNotFoundError. Compare with google_api.py line 34:
HERMES_HOME = Path(os.getenv("HERMES_HOME", Path.home() / ".hermes"))
Additionally, Google API dependencies (google-api-python-client, google-auth-oauthlib, google-auth-httplib2) are not included in the Hermes nix environment, and the nix env lacks pip/ensurepip to self-install them.
Proposed Fix
- In
setup.py, replace the hermes_constants import with a fallback matching google_api.py:
try:
from hermes_constants import display_hermes_home, get_hermes_home
HERMES_HOME = get_hermes_home()
except (ModuleNotFoundError, Exception):
HERMES_HOME = Path(os.getenv("HERMES_HOME", Path.home() / ".hermes"))
def display_hermes_home():
return "~/.hermes" if str(HERMES_HOME) == str(Path.home() / ".hermes") else str(HERMES_HOME)
- Add
google-api-python-client, google-auth-oauthlib, google-auth-httplib2 to the Hermes environment dependencies (nix or pip).
Bug Description
The
google-workspaceskill scripts (setup.pyandgoogle_api.py) cannot run with a standardpythonorpython3invocation:setup.pyimportshermes_constantsat module level, which is only available inside the Hermes nix/pip environment — not on the system Python. The fallback (Path(__file__).resolve().parents[4]) assumes a specific directory layout that does not match the installed skill path (~/.hermes/skills/productivity/google-workspace/scripts/).Neither script can install its own deps because the Hermes nix environment does not include
piporensurepip. The_ensure_deps()auto-install insetup.pyalways fails withNo module named pip.google_api.pydoes NOT depend onhermes_constants(it usesos.getenv("HERMES_HOME")), creating an inconsistency between the two scripts in the same skill.Steps to Reproduce
Expected Behavior
setup.pyshould work the same way asgoogle_api.py— usingos.getenv("HERMES_HOME")as fallback whenhermes_constantsis unavailable, and the Google API deps should either be bundled in the Hermes environment or the skill should document the correct invocation.Actual Behavior
setup.pycrashes withModuleNotFoundError: No module named 'hermes_constants'on any Python that is not the Hermes package environment with the correctPYTHONPATH.Affected Component
Messaging Platform
N/A (CLI only)
Debug Report
N/A — this is a code-level issue visible by reading
setup.pylines 31-37 vsgoogle_api.pyline 34.Operating System
macOS (nix-managed Hermes installation)
Python Version
System: 3.9.6, Hermes env: 3.12.13
Hermes Version
0.9.0
Root Cause Analysis
setup.pylines 31-37:The fallback re-raises the same
ModuleNotFoundError. Compare withgoogle_api.pyline 34:Additionally, Google API dependencies (
google-api-python-client,google-auth-oauthlib,google-auth-httplib2) are not included in the Hermes nix environment, and the nix env lackspip/ensurepipto self-install them.Proposed Fix
setup.py, replace thehermes_constantsimport with a fallback matchinggoogle_api.py:google-api-python-client,google-auth-oauthlib,google-auth-httplib2to the Hermes environment dependencies (nix or pip).