pathwaycom/pathway · error · ValueError

behavior {behavior} unsupported in sliding/tumbling window

Error message

behavior {behavior} unsupported in sliding/tumbling window

What it means

Error "behavior {behavior} unsupported in sliding/tumbling window" thrown in pathwaycom/pathway.

Source

Thrown at python/pathway/stdlib/temporal/_window.py:315

            if isinstance(behavior, ExactlyOnceBehavior):
                duration: IntervalType
                # that is split in two if-s, as it helps mypy figure out proper types
                # one if impl left either self.ratio or self.duration as optionals
                # which won't fit into the duration variable of type IntervalType
                if self.duration is not None:
                    duration = self.duration
                elif self.ratio is not None:
                    duration = self.ratio * self.hop
                shift = (
                    behavior.shift
                    if behavior.shift is not None
                    else zero_length_interval(type(duration))
                )
                behavior = common_behavior(
                    duration + shift, shift, True  # type:ignore
                )
            elif not isinstance(behavior, CommonBehavior):
                raise ValueError(
                    f"behavior {behavior} unsupported in sliding/tumbling window"
                )

            if behavior.cutoff is not None:
                cutoff_threshold = pw.this._pw_window_end + behavior.cutoff
                target = target._freeze(cutoff_threshold, pw.this._pw_key)
            if behavior.delay is not None:
                target = target._buffer(
                    target._pw_window_start + behavior.delay, target._pw_key
                )
                target = target.with_columns(
                    _pw_key=pw.if_else(
                        target._pw_key > target._pw_window_start + behavior.delay,
                        target._pw_key,
                        target._pw_window_start + behavior.delay,
                    )
                )

View on GitHub (pinned to fa2f74a464)

Solutions

  1. Use a supported behavior (e.g. pw.temporal.common_behavior() or exactly_once_behavior) for sliding/tumbling windows.

Example fix

pw.temporal.sliding(duration=timedelta(hours=1), behavior=pw.temporal.common_behavior())

When it happens

Trigger: Thrown at python/pathway/stdlib/temporal/_window.py:315 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/cb0d55581cfe023b. Report an issue: GitHub.