<#3560 [BUG] ContainerTask does not accept a task_...
# flyte-github
a
#3560 [BUG] ContainerTask does not accept a task_config Issue created by vkaiser-mb Describe the bug As described in the docu, flytekit.ContainerTask should be able to accept a
task_config
argument. Currently this fails with:
Copy code
Failed with Unknown Exception <class 'TypeError'> Reason: __init__() got multiple values for keyword argument 'task_config'
__init__() got multiple values for keyword argument 'task_config'
Expected behavior This code should execute without any error message:
Copy code
from flytekitplugins.pod import Pod
from kubernetes.client.models import V1PodSpec


from flytekit import ContainerTask, workflow, kwtypes, Resources

TC = Pod(
    pod_spec=V1PodSpec(
        containers=[],
        node_selector={"key": "value"},
    )
)

ct_task = ContainerTask(
    name="ellipse-area-metadata-shell",
    task_config=TC,
    input_data_dir="/var/inputs",
    output_data_dir="/var/outputs",
    inputs=kwtypes(a=float, b=float),
    outputs=kwtypes(area=float, metadata=str),
    image="<http://ghcr.io/flyteorg/rawcontainers-shell:v2|ghcr.io/flyteorg/rawcontainers-shell:v2>",
    command=[
        "./calculate-ellipse-area.sh",
        "{{.inputs.a}}",
        "{{.inputs.b}}",
        "/var/outputs",
    ],
    requests=Resources(
        cpu="100m",
        mem="1G",
    ),
)


@workflow
def wf():
    ct_task
Additional context to reproduce No response Screenshots No response Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte