I’m trying to upgrade to dagster 1.5, and I’m gett...
# ask-community
j
I’m trying to upgrade to dagster 1.5, and I’m getting an error message that seems to contradict itself. It says I have to use OpExecutionContext type annotation, which I’m doing, and I can’t figure out how to proceed. Am I missing something? The code:
Copy code
@op(
    required_resource_keys={"dd_logger", "dd_tracer"},
    out=Out(int, io_manager_key="df_io_manager"),
)
def facility_ba(
    context: OpExecutionContext,
) -> int:
    return 1
The error:
Copy code
dagster._core.errors.DagsterInvalidDefinitionError: Cannot annotate `context` parameter with type OpExecutionContext. `context` must be annotated with AssetExecutionContext, OpExecutionContext, or left blank.
Ah, I’ve figured it out. I had done
from __future__ import annotations
, which apparently doesn’t play well with dagster 1.5+