pathwaycom/pathway · error · Exception
unsupported interval type
Error message
unsupported interval type
What it means
Error "unsupported interval type" thrown in pathwaycom/pathway.
Source
Thrown at python/pathway/stdlib/temporal/utils.py:35
mapping: dict[Any, TimeEventType] = {
dt.INT: 0,
dt.FLOAT: 0.0,
dt.DATE_TIME_NAIVE: pd.Timestamp(year=1973, month=1, day=1, tz=None),
dt.DATE_TIME_UTC: pd.Timestamp(year=1973, month=1, day=1, tz=tz.UTC),
# 1973 because it started on Monady and then by default all week-wide windows start on Monday
}
return mapping[time_event_type]
def zero_length_interval(interval_type: type[IntervalType]) -> IntervalType:
if issubclass(interval_type, datetime.timedelta):
return datetime.timedelta(0)
elif issubclass(interval_type, int):
return 0
elif issubclass(interval_type, float):
return 0.0
else:
raise Exception("unsupported interval type")
def _get_possible_types(type: Any) -> tuple[dt.DType, ...]:
if type is TimeEventType:
return (dt.INT, dt.FLOAT, dt.DATE_TIME_NAIVE, dt.DATE_TIME_UTC)
if type is IntervalType:
return (dt.INT, dt.FLOAT, dt.DURATION, dt.DURATION)
raise ValueError("Type has to be either TimeEventType or IntervalType.")
def check_joint_types(parameters: dict[str, tuple[Any, Any]]) -> None:
"""Checks if all parameters have types that allow to execute a function.
If parameters are {'a': (a, TimeEventType), 'b': (b, IntervalType)} then
the following pairs of types are allowed for (a, b): (int, int), (float, float),
(datetime.datetime, datetime.timedelta)
"""
parameters = {View on GitHub (pinned to fa2f74a464)
Solutions
- Use a supported interval type, e.g. pw.temporal.Interval with int or Duration bounds.
Example fix
pw.temporal.Interval(-10, 10)
When it happens
Trigger: Thrown at python/pathway/stdlib/temporal/utils.py:35 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/e951d825f34ad5dc.
Report an issue: GitHub.