You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: artifacts displaying on Generation Strategy Graph of compute_analyses #5198
Hypothesis / proposed fix: the “Generation Strategy Graph” card is rendered via Graphviz → SVG, and GraphvizAnalysisCard._body_html() appears to embed the raw result of Source.pipe(format="svg"). In some environments pipe() returns bytes, so the notebook ends up rendering b'...svg...' (and/or other garbled output) as “artifacts”.
Proposed change: decode the SVG bytes before embedding in HTML, e.g. svg = svg.decode("utf-8", errors="replace") when isinstance(svg, (bytes, bytearray)).
Test plan: add a small unit test that either (a) mocks pipe() to return bytes and asserts the HTML does not contain "b'", or (b) generates a tiny Digraph and asserts the output HTML contains "<svg" and no "b'".
Activity
prabhaks commentedon Jul 2, 2026
Hi! I can take a stab at this.
Hypothesis / proposed fix: the “Generation Strategy Graph” card is rendered via Graphviz → SVG, and
GraphvizAnalysisCard._body_html()appears to embed the raw result ofSource.pipe(format="svg"). In some environmentspipe()returns bytes, so the notebook ends up renderingb'...svg...'(and/or other garbled output) as “artifacts”.Proposed change: decode the SVG bytes before embedding in HTML, e.g.
svg = svg.decode("utf-8", errors="replace")whenisinstance(svg, (bytes, bytearray)).Test plan: add a small unit test that either (a) mocks
pipe()to return bytes and asserts the HTML does not contain"b'", or (b) generates a tiny Digraph and asserts the output HTML contains"<svg"and no"b'".If that sounds right, I’ll open a PR shortly.