Hello Asana Team,
I’m evaluating Asana API for my organisation.
I want to create a task in a specific section so I’m using memberships and the following code:
result = client.tasks.create_subtask_for_task({
"data": {
"name": "API test My Task",
"memberships":
{
"project": 1234,
"section": 5678,
}
}
})
But I receive the error:
File "/home/user/asana/task_create_test_asana.py", line 26, in <module>
"section": 1197543297642289,
File "/usr/local/lib/python3.6/site-packages/asana/resources/gen/tasks.py", line 88, in create_subtask_for_task
path = "/tasks/{task_gid}/subtasks".replace("{task_gid}", task_gid)
TypeError: replace() argument 2 must be str, not dict
What am I doing wrong?