Third report of gateway crashing with: ImportError: cannot import name 'get_hermes_home' from 'hermes_constants' Root cause: stale .pyc bytecode files survive code updates. When Python loads a cached .pyc that references names from the old source, the import fails and the gateway won't start. Two bugs fixed: 1. Git update path: no cache clearing at all after git pull 2. ZIP update path: __pycache__ was explicitly in the preserve set Added _clear_bytecode_cache() helper that removes all __pycache__ dirs under PROJECT_ROOT (skipping venv/node_modules/.git/.worktrees). Called in both git and ZIP update paths, before pip install.
192 KiB
192 KiB