Asana / python-asana

Official Python client library for the Asana API v1
MIT License
303 stars 105 forks source link

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

Closed SalMireles closed 2 years ago

SalMireles commented 4 years ago

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

rossgrambo-zz commented 4 years ago

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.

jv-asana commented 2 years ago

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>')