pagination - Paginated request using python-asana API -


i trying export tasks of asana work-spaces using python-asana api. @ point exists after giving following error message.

traceback (most recent call last):   file "export.py", line 56, in <module>     index, task in enumerate(tasks):   file "build\bdist.win32\egg\asana\page_iterator.py", line 58, in items   file "build\bdist.win32\egg\asana\page_iterator.py", line 54, in next   file "build\bdist.win32\egg\asana\page_iterator.py", line 43, in __next__   file "build\bdist.win32\egg\asana\page_iterator.py", line 74, in get_next   file "build\bdist.win32\egg\asana\client.py", line 104, in   file "build\bdist.win32\egg\asana\client.py", line 75, in request asana.error.invalidrequesterror: invalid request: pagination token has expired. 

i read solve need make paginated requests. tried passing offset request following:

tasks = client.tasks.find_all({'project' : project['id']}, limit=50) 

but, there no difference not getting 'next_page' value though there more 50 tasks in project.

so question is:

how can paginated request using python-asana api? explanation example best!

edit:

i fetching tasks below:

tasks = client.tasks.find_all({'project' : project['id']}, item_limit=1) print "tasks", tasks    # prints generator object index, task in enumerate(tasks):     complete_task = client.tasks.find_by_id(task["id"])     print complete_task    #prints complete task dictionary 

now question next_page content remaining tasks , how access it.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -