pathwaycom/pathway · warning · NotImplementedError
Cannot plot diff table in a static mode
Error message
Cannot plot diff table in a static mode
What it means
The visualization helper for Pathway tables supports two rendering modes: a dynamic Bokeh view over updating tables and a static snapshot view. When bounded=True (diff-friendly rendering with _time/_diff handling) is combined with snapshot=True (static mode), the code explicitly raises NotImplementedError because static rendering of diff tables (with _diff coloring) is not implemented.
Source
Thrown at python/pathway/stdlib/viz/table_viz.py:124
disabled=True,
show_index=False,
height=table_height,
sorters=sorters,
pagination="local",
page_size=page_size,
sizing_mode="stretch_width",
)
def color_negative_red(row):
color = "red" if row["diff"] < 0 else "green"
return [f"color: {color}" for _ in row]
if not snapshot:
dynamic_table.style.apply(color_negative_red, axis=1) # type:ignore[union-attr]
if bounded:
if not snapshot:
raise NotImplementedError(
"Cannot plot diff table in a static mode"
) # todo: implement with support for _time and _diff
[captured] = gr.run_tables(self)
output_data = api.squash_updates(captured)
keys = list(output_data.keys())
dict_data = {
name: [_format_types(output_data[key][index]) for key in keys]
for index, name in enumerate(self._columns.keys())
}
dynamic_table.value = pd.DataFrame(dict_data)
else:
integrated = {}
def update(key, row, time, is_addition):
row["id"] = key
if not snapshot:
row["time"] = time
row["diff"] = is_addition * 2 - 1View on GitHub (pinned to fa2f74a464)
Solutions
- Set snapshot=False to render the dynamic diff-aware view
- Or keep snapshot=True but plot a non-diff (squashed/integrated) representation: materialize the table first (e.g. via pw.debug.compute_and_print-style capture or an io connector) and plot that snapshot table without bounded=True
- Check the viz call signature for your Pathway version; pass bounded/snapshot explicitly rather than relying on defaults
Example fix
# before viz(table, snapshot=True, bounded=True) # NotImplementedError # after viz(table, snapshot=False, bounded=True) # dynamic diff view
Defensive patterns
Strategy: validation
Validate before calling
assert not (snapshot and bounded), 'diff-aware bounded rendering is unsupported in static snapshot mode; use snapshot=False'
Try / catch
try:
viz(table, snapshot=True, bounded=True)
except NotImplementedError:
viz(table, snapshot=False, bounded=True) Prevention
- Pass snapshot/bounded explicitly instead of relying on defaults
- For static exports, plot a captured/squashed table without bounded=True
- Watch release notes when viz defaults change between Pathway versions
When it happens
Trigger: Calling the table viz/plot API with bounded=True and snapshot=True on a table that produces diffs; using a static export helper (e.g. for docs/notebooks) on a table observed with updates; a wrapper that defaults to snapshot=True while the plot path defaults to bounded=True.
Common situations: Exporting pipeline state to a static HTML/screenshot where the code path chose diff-aware rendering; upgrading Pathway so viz defaults changed (snapshot for non-bokeh environments like CI headless rendering); plotting a table from an updating connector with the bounded flag copied from example code.
Related errors
- {node.sql()} not supported.
- PIVOTS not supported
- {key}: {repr} not supported.
- Currently, tantivy bm25 index is supported only in the as-of
- Currently, usearch knn index is supported only in the as-of-
AI-assisted analysis of pathwaycom/pathway@fa2f74a464 (2026-08-15).
Data as JSON: /api/errors/a201ff29e9c6f8c2.
Report an issue: GitHub.