pathwaycom/pathway · error · ValueError
Unsupported direction: {self._direction}
Error message
Unsupported direction: {self._direction} What it means
Error "Unsupported direction: {self._direction}" thrown in pathwaycom/pathway.
Source
Thrown at python/pathway/stdlib/temporal/_asof_join.py:328
prev_id,
pw.if_else(
cur_t - pw.unwrap(prev_t) < pw.unwrap(next_t) - cur_t,
prev_id,
next_id,
),
),
)
peer_elem = select_nearest(
m.t,
m.prev_diff,
m.next_diff,
m.ix(m.prev_diff, optional=True).t,
m.ix(m.next_diff, optional=True).t,
)
else:
raise ValueError(f"Unsupported direction: {self._direction}")
m += m.select(peer_elem=peer_elem)
def fill_self(m_self: pw.Table, side: bool):
return {
req.output_name: m_self[req.internal_name]
for req in self._all_cols
if req.side == side
}
def fill_peer(m_self: pw.Table, side: bool):
reqs = [req for req in self._all_cols if req.side != side]
reqs_with_default = [req for req in reqs if req.default is not None]
reqs_wo_default = [req for req in reqs if req.default is None]
m_with_peer = m_self.filter(m_self.peer_elem.is_not_none())
res_default = m_self.select(
**{req.output_name: req.default for req in reqs_with_default}View on GitHub (pinned to fa2f74a464)
Solutions
- Use one of Direction.BACKWARD, Direction.FORWARD, or Direction.NEAREST for the asof join.
Example fix
t1.asof_join(t2, t1.t, t2.t, direction=pw.temporal.Direction.BACKWARD)
When it happens
Trigger: Thrown at python/pathway/stdlib/temporal/_asof_join.py:328 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/46da1b4491305785.
Report an issue: GitHub.