Skip to content

Commit 9a411db

Browse files
committed
use task_dict instead of attrs_values to get inputs when running python function tasks
1 parent 125a0a5 commit 9a411db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pydra/compose/python.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import inspect
33
from typing import dataclass_transform
44
import attrs
5-
from pydra.utils.general import task_fields, attrs_values
5+
from pydra.utils.general import task_fields, task_dict
66
from pydra.compose import base
77
from pydra.compose.base import (
88
ensure_field_objects,
@@ -231,7 +231,7 @@ class PythonTask(base.Task[PythonOutputsType]):
231231

232232
def _run(self, job: "Job[PythonTask]", rerun: bool = True) -> None:
233233
# Prepare the inputs to the function
234-
inputs = attrs_values(self)
234+
inputs = task_dict(self)
235235
del inputs["function"]
236236
# Run the actual function
237237
returned = self.function(**inputs)

0 commit comments

Comments
 (0)