You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Problem with changing tags which contains '.' - 404007: Resource Not Found #994
I cannot change it because i'm getting: 404007: Resource Not Found.
NOTE: When i was trying to use code below with tags without a dots it worked. It only don't works for tags with dot.
It's quite huge problem because I need to replace this dots in almost 400 workbook tags 😢
I found something related like #675 or #578 but i did not get much from it.
Versions
Details of environment:
Tableau Server Version: 2021.4.2 (20214.21.1217.2252) 64-bit Linux
Python 3.9.7
tableauserverclient 0.17.0.
To Reproduce
Here's code:
# here i just use methods which allows me to get to the site, importing TSC
from login_to_client import get_auth, get_server
import tableauserverclient as TSC
# getting to the site
tableau_auth = get_auth(site)
server = get_server()
with server.auth.sign_in(tableau_auth):
# getting list with all workbooks on the server
all_workbooks , pagination_item = server.workbooks.get()
# grab first workbook
workbook = all_workbooks[0]
workbook_tags = workbook.tags
# logging info about tags
myloger.info(workbook_tags)
try:
# i try to set tags to empty set
workbook.tags = set()
# updating workook
server.workbooks.update(workbook)
myloger.info('updating has been finished')
except Exception as e:
myloger.error(e)
This code works without any problem when there's no dot in the tag name.
The problem occurs when there's a dot.
Results
MyLogger[9716] INFO {'my_tag.foo'}
MyLogger[9716] ERROR
404007: Resource Not Found
Tag 'my_tag' could not be found.
Activity
bcantoni commentedon Feb 23, 2022
I can reproduce the same on Tableau Online which is currently on version 20221.22.0219.1914.
I tried the actual REST API call that TSC makes and it also fails:
curl -X DELETE https://10ax.online.tableau.com:443/api/3.15/sites/<site-id>/workbooks/<workbook-id>/tags/testy.testerThis looks like a problem on the server backend side.
difemaro commentedon Feb 23, 2022
Changing the line 33 on resource_tagger.py from:
self.delete_request(url)
To
self.delete_request(url + '.')
It seems the rest api service from Tableau, truncates the DELETE url, to the previous character to the last point found.
Regards,
Diego Martinez
Tableau Ambassador
Cloudy17g35 commentedon Feb 24, 2022
@difemaro solution is working for situation when we both have a dot in the tag or we don't have it.
I think that it resolves this problem.
bcantoni commentedon Feb 24, 2022
I reported this internally, so let's reopen this bug until we can get a proper fix.
In the meantime, the workaround above sounds like it works for anyone who runs into this.
bcantoni commentedon Mar 14, 2022
The internal team at Tableau is fixing this issue with the REST API (issue number 1379992).
fix: encode special characters in tag delete URL path
fix: encode special characters in tag delete URL path
fix: encode special characters in tag delete URL path
fix: quote tag labels containing spaces or commas (#1782)