server-client-python
server-client-python copied to clipboard
400029:Bad Request : there was a problem deleting Workbook
Describe the bug
- The issue is that delete workbook method raises an exception "400029:Bad Request : there was a problem deleting Workbook" whereas the content is actually getting deleted from the Tableau Server. This occurs when looping around the contents as well as when a single content is attempted to delete.
Versions Details of your environment, including:
- Tableau Server version - 2023.1.4
- Python version - 3.12
- TSC library version - 0.28
To Reproduce Use the server.workbooks.delete method to delete a workbook or multiple workbooks and eventually you will get a generic error "400029:Bad Request : there was a problem deleting Workbook"
import tableauserverclient as TSC
#Username and Password TOKEN_NAME = 'token' TOKEN_VALUE = 'token_value' tableau_auth = TSC.PersonalAccessTokenAuth(TOKEN_NAME, TOKEN_VALUE)
server = TSC.Server('tableauserverURL', use_server_version=True)
server.add_http_options({'verify': False}) server.version = '3.19' if server.auth.sign_in(tableau_auth): print("Signed In !!") else: print("Unable to Sign In ! Please re-try !! \n\n")
wb = server.workbooks.get_by_id('workbook-id') print(wb.name) workbook= server.workbooks.delete('workbook-id') server.auth.sign_out()
Results What are the results or error messages received?
Traceback (most recent call last):
File "D:\PythonScripts\auto_Archive_Tableau_Workbooks - Copy.py", line 77, in
400029: Bad Request
There was a problem deleting workbook 'aecef221-9e27-4002-895d-6e9d962a0dae'.