Skip to content

Fix interactive service launch on system-python builds and surface failures#1728

Merged
BryonLewis merged 1 commit into
mainfrom
dev/interactive-launch-and-error-surfacing
Jun 30, 2026
Merged

Fix interactive service launch on system-python builds and surface failures#1728
BryonLewis merged 1 commit into
mainfrom
dev/interactive-launch-and-error-surfacing

Conversation

@mattdawkins

Copy link
Copy Markdown
Member

Summary

The unified interactive service (segmentation + stereo) failed to launch on VIAME builds that use the system Python interpreter rather than a bundled one, and several failure modes degraded silently instead of being reported to the user. This addresses both.

Launch fixes

  • bin/python fallback (linux.ts)getViamePythonExe() hard-coded <viamePath>/bin/python, which only exists in bundled binary installs. From-source builds against system Python have no such interpreter (they rely on PYTHONPATH set by setup_viame.sh). It now uses the bundled interpreter when present and otherwise falls back to python on PATH. Windows is unchanged.
  • -I-s (interactive.ts) — the service was spawned with python -I, but isolated mode implies -E, which discards PYTHONPATH, so viame could not be imported (No module named 'viame'). Switched to -s (ignore the per-user site dir, but keep PYTHONPATH). The original intent of -I (avoid a stray cwd entry shadowing packages) is already covered because the process cwd is forced to viamePath, which has no shadowing modules.

Error surfacing

  • Stereo enable launch failures (interactive.ts, api.ts, ViewerLoader.vue) — the stereo service watcher auto-runs on dataset load (not user-initiated) and previously degraded all failures silently so that uncalibrated datasets wouldn't pop a dialog. That also swallowed genuine service-launch failures. enable() now tags infrastructure failures with launchFailed, and the watcher always surfaces those in a dialog, while benign per-dataset failures (e.g. missing calibration) still degrade quietly.

Notes

  • Stereo-segmentation match failures on the second camera (returning success: false with a clear message rather than an empty polygon) are handled in the corresponding viame.core Python service and are not part of this client diff.
  • Build artifacts under client/.electron/ are gitignored and not included.

…ace failures

Fall back to the PATH python interpreter when bin/python is absent and use -s
instead of -I so the PYTHONPATH set by setup_viame.sh is preserved. Report stereo
segmentation match failures and service-launch failures to the user instead of
failing silently.

@BryonLewis BryonLewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, mostly looks good to me.

@BryonLewis BryonLewis merged commit 12e2208 into main Jun 30, 2026
3 checks passed
@BryonLewis BryonLewis deleted the dev/interactive-launch-and-error-surfacing branch June 30, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants