{"record":{"id":"2065c795e0a6a327","repo":"dbt-labs/dbt-core","slug":"callbacks-eventmanager-hooks-are-not-yet-suppor","errorCode":null,"errorMessage":"callbacks= (EventManager hooks) are not yet supported.","messagePattern":"callbacks= \\(EventManager hooks\\) are not yet supported\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"crates/dbt-sa-python/python/dbt/runner.py","lineNumber":111,"sourceCode":"            argv += [flag, str(value)]\n    return argv\n\n\nclass dbtRunner:\n    \"\"\"In-process dbt runner. Reuse one instance across calls.\"\"\"\n\n    # Each invoke() gets its own log file, verbosity and warn-error options. Concurrent\n    # invokes are serialized, since a run's log layers are installed process-wide.\n    # `--log-level trace` acts as `debug`: the subscriber's cap is fixed per process.\n\n    def __init__(self, manifest: Any = None, callbacks: Any = None):\n        if manifest is not None:\n            raise NotImplementedError(\n                \"manifest= injection is not yet supported. Reuse the runner \"\n                \"instance across invocations to avoid re-parsing.\"\n            )\n        if callbacks is not None:\n            raise NotImplementedError(\"callbacks= (EventManager hooks) are not yet supported.\")\n        self._runner = _DbtRunner()\n\n    def invoke(self, args: List[str], **kwargs) -> dbtRunnerResult:\n        argv = list(args) + _kwargs_to_cli(kwargs)\n        try:\n            core = self._runner.invoke(argv)\n        except (KeyboardInterrupt, SystemExit):\n            raise\n        except BaseException as exc:\n            # Parse errors and caught panics: hand back on the result, don't\n            # kill the interpreter.\n            return dbtRunnerResult(success=False, result=None, exception=exc)\n        # Engine reports errors on the result, not by raising; surface the message.\n        exception = DbtRunnerError(core.exception) if core.exception else None\n        catalog = (\n            CatalogArtifact.from_msgpack(core.catalog_msgpack)\n            if core.catalog_msgpack is not None\n            else None","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-sa-python/python/dbt/runner.py#L93-L129","documentation":"NotImplementedError raised in DbtRunner.__init__ when a caller passes callbacks= (EventManager hooks) to the constructor. The callback/EventManager hook API from dbt-core's dbtRunner has not been ported to this runner yet, so any non-None callbacks argument is rejected at construction time.","triggerScenarios":"Calling DbtRunner(callbacks=[my_callback]) or DbtRunner(manifest=..., callbacks=...) — any non-None callbacks argument to __init__.","commonSituations":"Porting dbt-core dbtRunner code that registered event callbacks for logging/progress tracking; integrating with monitoring systems that hook dbt events; following dbt-core documentation examples.","solutions":["Remove the callbacks= argument from the DbtRunner constructor.","Capture progress via dbt's log output or the returned dbtRunnerResult instead of event hooks.","Use the official dbt-core dbtRunner if event callbacks are essential to your integration.","Wrap log handling externally (e.g. configure log levels/formatting via invoke kwargs like --log-level)."],"exampleFix":"// before\nrunner = DbtRunner(callbacks=[lambda e: print(e)])\n// after\nrunner = DbtRunner()\nresult = runner.invoke([\"run\"])\nprint(result.success, result.exception)","handlingStrategy":"try-catch","validationCode":"if callbacks:\n    print('callbacks= not supported by this DbtRunner; use log capture or dbtRunnerResult instead')","typeGuard":"def runner_supports_callbacks(runner_cls) -> bool:\n    import inspect\n    src = inspect.getsource(runner_cls.__init__)\n    return 'callbacks=' in inspect.signature(runner_cls.__init__).parameters and 'not yet supported' not in src","tryCatchPattern":"try:\n    runner = DbtRunner(callbacks=[on_event])\nexcept NotImplementedError:\n    runner = DbtRunner()  # capture progress from result/log output instead","preventionTips":["Avoid porting EventManager hook registrations from dbt-core to this runner.","Derive progress/monitoring from dbtRunnerResult (success, exception) and parsed logs.","Configure logging via invoke kwargs (e.g. log-level) rather than callbacks.","Track this runner's changelog for when callbacks= support lands."],"tags":["python","dbt-runner","not-implemented","callbacks"],"backgroundTag":"method-not-implemented","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}