{"record":{"id":"6788898e18d0d0f6","repo":"pathwaycom/pathway","slug":"table-out-of-scope","errorCode":null,"errorMessage":"table out of scope","messagePattern":"table out of scope","errorType":"exception","errorClass":"OutOfScopeError","httpStatus":null,"severity":"error","filePath":"python/pathway/internals/graph_runner/state.py","lineNumber":142,"sourceCode":"    def get_universe(self, key: universe.Universe):\n        if key not in self.universes:\n            return self.extract_universe(key)\n        return self.universes[key]\n\n    def has_universe(self, key: universe.Universe) -> bool:\n        return key in self.universes\n\n    def add_computer_logic(self, computer_callback: Callable) -> int:\n        id = len(self.computers)\n        self.computers.append(computer_callback)\n        return id\n\n    def get_computer_logic(self, id: int) -> Callable:\n        return self.computers[id]\n\n    def get_table(self, key: universe.Universe) -> api.Table:\n        if key not in self.tables:\n            raise OutOfScopeError(\"table out of scope\")\n        return self.tables[key]\n\n    def get_tables(self, keys: Iterable[universe.Universe]) -> list[api.Table]:\n        return [self.get_table(key) for key in keys]\n\n    def set_table(self, storage: Storage, table: api.Table) -> None:\n        self.tables[storage._universe] = table\n        self.storages[storage._universe] = storage\n\n    def get_storage(self, key: universe.Universe) -> Storage:\n        if key not in self.storages:\n            raise OutOfScopeError(\"path storage out of scope\")\n        return self.storages[key]\n\n    def get_storages(self, keys: Iterable[universe.Universe]) -> list[Storage]:\n        return [self.get_storage(key) for key in keys]\n\n    def set_error_log(self, table: table.Table, error_log: api.ErrorLog) -> None:","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/internals/graph_runner/state.py#L124-L160","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from pathway.internals.graph_runner.state import OutOfScopeError\n\ntry:\n    ...  # build/run pipeline\nexcept OutOfScopeError as e:\n    raise RuntimeError(\"internal graph-runner state error; report upstream\") from e","preventionTips":["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"],"tags":["pathway","internals","graph-runner","scope","internal-error"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}