Files
socialmag/deploy
juxtapoandClaude Opus 5 9968ba040f v0.7.4: the dash unit walked into the selectors.py trap
socialmag-dash crash-looped on a real box. WorkingDirectory was the repo and
ExecStart was `python -m http.server`, so socketserver's `import selectors`
found the repo's selectors.py and the unit died with "module 'selectors' has no
attribute 'SelectSelector'" every 5 seconds. :8321 never bound.

This is the SAME root cause already fixed twice this evening — once for
`-m socialmag` (console scripts, cli.py) and once for `-m venv` (run python
from /). Both fixes were about keeping the repo off sys.path, and then the unit
file put it right back on. A `-m` anywhere near this directory is the hazard,
not any particular entry point.

The dash now serves with --directory and sits in / instead of standing in the
tree it serves. The by-hand fallback instructions carried the identical bug and
now do the same, with a line saying why.

openbridge and refresh were never affected: they exec console scripts, which do
not put the working directory on sys.path. That is exactly why cli.py exists.

The real fix is renaming selectors.py and queue.py. Until then this trap keeps
finding new ways in, and that is not a prediction — it is three for three.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-13 02:46:06 +08:00
..