pathwaycom/pathway · error · OutOfScopeError
table out of scope
Error message
table out of scope
What it means
GraphRunnerScope.get_table raises OutOfScopeError('table out of scope') when asked for the api.Table registered under a given universe.Universe key but no table was ever set for that universe (key not in self.tables). This is internal engine bookkeeping: extraction order or cross-scope table usage is broken.
Source
Thrown at python/pathway/internals/graph_runner/state.py:142
def get_universe(self, key: universe.Universe):
if key not in self.universes:
return self.extract_universe(key)
return self.universes[key]
def has_universe(self, key: universe.Universe) -> bool:
return key in self.universes
def add_computer_logic(self, computer_callback: Callable) -> int:
id = len(self.computers)
self.computers.append(computer_callback)
return id
def get_computer_logic(self, id: int) -> Callable:
return self.computers[id]
def get_table(self, key: universe.Universe) -> api.Table:
if key not in self.tables:
raise OutOfScopeError("table out of scope")
return self.tables[key]
def get_tables(self, keys: Iterable[universe.Universe]) -> list[api.Table]:
return [self.get_table(key) for key in keys]
def set_table(self, storage: Storage, table: api.Table) -> None:
self.tables[storage._universe] = table
self.storages[storage._universe] = storage
def get_storage(self, key: universe.Universe) -> Storage:
if key not in self.storages:
raise OutOfScopeError("path storage out of scope")
return self.storages[key]
def get_storages(self, keys: Iterable[universe.Universe]) -> list[Storage]:
return [self.get_storage(key) for key in keys]
def set_error_log(self, table: table.Table, error_log: api.ErrorLog) -> None:View on GitHub (pinned to fa2f74a464)
Solutions
- If user code: report upstream with a minimal example; the library should guarantee scope consistency
- If custom operator: register the table for the universe via set_table before get_table
- Verify all operator dependencies are declared so the graph runner processes producers before consumers
Defensive patterns
Strategy: try-catch
Try / catch
from pathway.internals.graph_runner.state import OutOfScopeError
try:
... # build/run pipeline
except OutOfScopeError as e:
raise RuntimeError("internal graph-runner state error; report upstream") from e Prevention
- Report occurrences upstream with a minimal reproducer; user code cannot fix scope registration
- Avoid mixing Column/Table objects captured across different graph builds in the same process
When it happens
Trigger: An operator handler calls get_table for a universe whose storage was never passed through set_table; reusing universes from a different GraphRunnerScope; incorrect dependency ordering in a custom operator handler.
Common situations: Developing custom operators against pathway.internals; pathway version mismatches between captured graph state and runner state; almost never produced by pure user-level pipeline code.
Related errors
- column out of scope
- path storage out of scope
- invalid expression in restricted context
- datasource not supported
- datasink not supported
AI-assisted analysis of pathwaycom/pathway@fa2f74a464 (2026-08-15).
Data as JSON: /api/errors/6788898e18d0d0f6.
Report an issue: GitHub.