fix: plotly graph rendering in Test GNSS GUI #49

Merged
ykp merged 1 commit from fix/plotly-graph-rendering into main 2026-10-07 10:14:52 +02:00
Owner

Bug fix - Run button does not generate correlation graphs

Root cause: two issues in _render_surface_to_photo():

  1. fig.to_image() was called with engine='kaleido' - this kwarg was removed in plotly 7.x
  2. Even without the kwarg, plotly 7.x's to_image() requires Chrome to be installed

Fix:

  • Removed engine='kaleido' from to_image() call
  • Wrapped to_image() and PIL conversion in try/except - returns None when image engine unavailable
  • _display_result() handles None by falling back to _open_in_browser() which generates an interactive plotly HTML file and opens it in the default web browser

Behavior:

  • With Chrome/kaleido installed: inline PNG rendered in tkinter (as before)
  • Without Chrome: interactive plot opens in system browser - no silent failure
## Bug fix - Run button does not generate correlation graphs Root cause: two issues in _render_surface_to_photo(): 1. fig.to_image() was called with engine='kaleido' - this kwarg was removed in plotly 7.x 2. Even without the kwarg, plotly 7.x's to_image() requires Chrome to be installed Fix: - Removed engine='kaleido' from to_image() call - Wrapped to_image() and PIL conversion in try/except - returns None when image engine unavailable - _display_result() handles None by falling back to _open_in_browser() which generates an interactive plotly HTML file and opens it in the default web browser Behavior: - With Chrome/kaleido installed: inline PNG rendered in tkinter (as before) - Without Chrome: interactive plot opens in system browser - no silent failure
fix: plotly graph rendering in Test GNSS GUI
All checks were successful
ci / test (3.9) (pull_request) Successful in 2m56s
ci / test (3.14) (pull_request) Successful in 1m54s
ci / test (3.12) (pull_request) Successful in 2m0s
ci / testgnss (3.12) (pull_request) Successful in 2m58s
ci / testgnss (3.14) (pull_request) Successful in 3m0s
ci / testgnss (3.9) (pull_request) Successful in 3m12s
4b0dc26063
Root cause: plotly 7.x to_image() no longer accepts engine='kaleido'
kwarg, and even without it kaleido requires Chrome to be installed.

Fix:
- Remove engine='kaleido' from to_image() call
- Wrap to_image() in try/except — returns None when image engine
  unavailable (no Chrome / no kaleido)
- _display_result() handles None by falling back to _open_in_browser()
  which generates an interactive HTML file and opens it in the
  default web browser via webbrowser.open()
- Import CorrelationResult for the fallback method signature
ykp merged commit e01a84af3d into main 2026-10-07 10:14:52 +02:00
ykp deleted branch fix/plotly-graph-rendering 2026-10-07 10:14:52 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ykp/gengnss!49
No description provided.