pathwaycom/pathway · error · ValueError

interpolate: Invalid mode. Only Interpolate.LINEAR is curren

Error message

interpolate: Invalid mode. Only Interpolate.LINEAR is currently available.

What it means

Error "interpolate: Invalid mode. Only Interpolate.LINEAR is currently available." thrown in pathwaycom/pathway.

Source

Thrown at python/pathway/stdlib/statistical/_interpolate.py:105

    ... 2         |          |
    ... 3         | 3        |
    ... 4         |          |
    ... 5         |          |
    ... 6         | 6        | 60
    ... ''')
    >>> table = table.interpolate(pw.this.timestamp, pw.this.values_a, pw.this.values_b)
    >>> pw.debug.compute_and_print(table, include_id=False)
    timestamp | values_a | values_b
    1         | 1.0      | 10.0
    2         | 2.0      | 20.0
    3         | 3.0      | 30.0
    4         | 4.0      | 40.0
    5         | 5.0      | 50.0
    6         | 6.0      | 60.0
    """

    if mode != InterpolateMode.LINEAR:
        raise ValueError(
            """interpolate: Invalid mode. Only Interpolate.LINEAR is currently available."""
        )

    if isinstance(timestamp, pw.ColumnReference):
        timestamp = self[timestamp]
    else:
        if isinstance(timestamp, str):
            raise ValueError(
                "Table.interpolate(): Invalid column reference for the parameter timestamp,"
                + f" found a string. Did you mean this.{timestamp} instead of {repr(timestamp)}?"
            )
        raise ValueError(
            "Table.interpolate(): Invalid column reference for the parameter timestamp."
        )

    ordered_table = self.sort(key=timestamp)

    table = self

View on GitHub (pinned to fa2f74a464)

Solutions

  1. Use mode=Interpolate.LINEAR; other interpolation modes are not yet supported.

Example fix

t.interpolate(this.ts, this.value, mode=pw.stdlib.statistical.Interpolate.LINEAR)

When it happens

Trigger: Thrown at python/pathway/stdlib/statistical/_interpolate.py:105 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/8852d914f94803c0. Report an issue: GitHub.