Asana / python-asana

Official Python client library for the Asana API v1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'Tags' object has no attribute 'delete_tag'

SalMireles opened this issue · comments

Error when deleting a tag. Command used: client.tags.delete_tag(tag_gid, iterator_type=None)

If you're before 0.10.~ you'll use client.tags.delete

If you think you're on 0.10.~ or later, try running print("ASANA VERSION:" + asana.__version__) to confirm what version is actually running. Many people are having issues with python2 vs python3 having different versions installed.

Hi @SalMireles, it's been 2 years now. I am going to assume you this resolved and will close this issue out. As a quick summary:

Like @rossgrambo-zz mentioned if you are before 0.10.~ you can use the following to delete your tags:

import asana

client = asana.Client.access_token('<YOUR_ASANA_PERSONAL_ACCESS_TOKEN>')
result = client.tags.delete('<YOUR_TAG_GID>')

Otherwise for the latest version of the python-asana client library please use:

import asana

client = asana.Client.access_token('<YOUR_ASANA_PERSONAL_ACCESS_TOKEN>')
result = client.tags.delete_tag('<YOUR_TAG_GID>')