pathwaycom/pathway · error · ValueError
statistical.diff(): Invalid column reference for the paramet
Error message
statistical.diff(): Invalid column reference for the parameter timestamp.
What it means
Error "statistical.diff(): Invalid column reference for the parameter timestamp." thrown in pathwaycom/pathway.
Source
Thrown at python/pathway/stdlib/ordered/diff.py:93
>>> pw.debug.compute_and_print(table, include_id=False)
timestamp | instance | values | diff_values
1 | 0 | 1 |
2 | 1 | 2 |
3 | 0 | 7 | 6
3 | 1 | 4 | 2
6 | 0 | 16 | 9
6 | 1 | 11 | 7
"""
if isinstance(timestamp, pw.ColumnReference):
timestamp = self[timestamp]
else:
if isinstance(timestamp, str):
raise ValueError(
"statistical.diff(): Invalid column reference for the parameter timestamp,"
+ f" found a string. Did you mean this.{timestamp} instead of {repr(timestamp)}?"
)
raise ValueError(
"statistical.diff(): Invalid column reference for the parameter timestamp."
)
ordered_table = self.sort(key=timestamp, instance=instance)
for value in values:
if isinstance(value, pw.ColumnReference):
value = self[value]
else:
if isinstance(value, str):
raise ValueError(
"statistical.diff(): Invalid column reference for the parameter value,"
+ f" found a string. Did you mean this.{value} instead of {repr(value)}?"
)
raise ValueError(
"statistical.diff(): Invalid column reference for the parameter value."
)
View on GitHub (pinned to fa2f74a464)
Solutions
- Pass a ColumnReference for the timestamp parameter, e.g. this.timestamp or <table>.timestamp.
Example fix
pw.stdlib.statistical.diff(this.timestamp, this.value)
When it happens
Trigger: Thrown at python/pathway/stdlib/ordered/diff.py:93 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pathwaycom/pathway@fa2f74a464 (2026-08-15).
Data as JSON: /api/errors/d663c2005cb23c94.
Report an issue: GitHub.