b

    Belal Aboabdo

    1 year ago
    Hi I'm trying to checkpoint with
    S3Results
    but am getting this error when mapping the function.
    [2021-02-24 14:11:49-0800] ERROR - prefect.TaskRunner | Task 'plot_map_counts_data[0]': Unexpected error while running task: TypeError("exists() got multiple values for argument 'location'",)
    The flow runs successfully without checkpointing, here's an example of the task.
    @task(
        checkpoint=True,
        target="{flow_name}/{today}/{task_name}_{map_index}.png",
        result=prefect.engine.results.S3Result(bucket=results_s3_bucket),
    )
    def plot_map_counts_data(df, location, resource):
        #some task
        return image
    
    with Flow("example") as flow:
    
        plot_map_counts_data.map(
            df,
            locations,
            unmapped("test_resource"),
        )
    j

    josh

    1 year ago
    Hi @Belal Aboabdo I believe
    location
    may end up bring a reserved word here when formatting the target. 🤔 If you change
    location
    in your task kwargs does it work?
    b

    Belal Aboabdo

    1 year ago
    Awesome you're right it worked. Thank you!
    j

    josh

    1 year ago
    @Marvin open “Location cannot be used as task kwarg when using Result”
    Marvin

    Marvin

    1 year ago