Hi. I have an IO manager that handles partitions v...
# ask-community
b
Hi. I have an IO manager that handles partitions via the time range:
Copy code
if context.has_partition_key:
                time_window = context.asset_partitions_time_window
                start_date = time_window.start.date()
                end_date = time_window.end.date()
But when I test this:
Copy code
context = build_output_context(
        asset_key=AssetKey(("test", "test_table")),
        partition_key="2022-01-02",
    )
I get an error accessing that time window via `context.asset_partitions_time_window`:
dagster._core.errors.DagsterInvariantViolationError: Attempting to access step_context, but it was not provided when constructing the OutputContext