InvalidRequestError: Invalid Request: column: Not a valid GID type: number
shubhamdipt opened this issue · 2 comments
client.sections.add_task( section["gid"], params={"task": task["gid"]} )
This throws an error: asana.error.InvalidRequestError: Invalid Request: column: Not a valid GID type: number
Although all the gids used are valid.
It works for me. I just tried.
I think the issue should be closed.
Hi @shubhamdipt, I know this is a very late reply but
Both of the following works:
Method 1:
import os
import asana
from pprint import pprint
client = asana.Client.access_token(os.environ['ASANA_PERSONAL_ACCESS_TOKEN'])
result = client.sections.add_task('<YOUR_SECTION_GID>', {'task': '<YOUR_TASK_GID>'})
pprint(result)
Method 2:
import os
import asana
from pprint import pprint
client = asana.Client.access_token(os.environ['ASANA_PERSONAL_ACCESS_TOKEN'])
result = client.sections.add_task_for_section('<YOUR_SECTION_GID>', {'task': '<YOUR_TASK_GID>'})
pprint(result)
If you are using Method 1 we recommend switching to using Method 2 as this method was auto generated from our OpenAPI Spec File and is what we define in our developer docs POST /sections/{section_gid}/addTask. We will most likely deprecate Method 1 in a future python-asana client library release since this was a manually written wrapper to call this API endpoint.