pathwaycom/pathway · error · ValueError
If max_difference is a Duration, the values of a column must
Error message
If max_difference is a Duration, the values of a column must either have a type of DateTimeUtc, DateTimeNaive or Duration. However, the column '{column}' has type '{column_type.typehint}' What it means
Error "If max_difference is a Duration, the values of a column must either have a type of DateTimeUtc, DateTimeNaive or Duration. However, the column '{column}' has type '{column_type.typehint}'" thrown in pathwaycom/pathway.
Source
Thrown at python/pathway/io/_synchronization.py:327
def _check_column_type(column, max_difference):
column_type = column._column.dtype
if column_type not in _SUPPORTED_COLUMN_DTYPES:
raise ValueError(
f"Fields of type {column_type.typehint} are not supported in connector groups"
)
if isinstance(max_difference, int) and column_type != dtype.INT:
raise ValueError(
"If max_difference is an integer value, the values of a column must have a type of "
f"int. However, the column '{column}' has type '{column_type.typehint}'"
)
if isinstance(max_difference, datetime.timedelta) and column_type not in (
dtype.DATE_TIME_NAIVE,
dtype.DATE_TIME_UTC,
dtype.DURATION,
):
raise ValueError(
"If max_difference is a Duration, the values of a column must either have a type of "
f"DateTimeUtc, DateTimeNaive or Duration. However, the column '{column}' "
f"has type '{column_type.typehint}'"
)
View on GitHub (pinned to fa2f74a464)
Solutions
- When max_difference is a Duration, use a column of type DateTimeUtc, DateTimeNaive or Duration; cast or convert the column to one of these types first.
Example fix
t = t.select(ts=t.ts.strptime(fmt='%Y-%m-%d %H:%M:%S', contains_timezone=False))
When it happens
Trigger: Thrown at python/pathway/io/_synchronization.py:327 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/f2731e963994e067.
Report an issue: GitHub.