server-client-python icon indicating copy to clipboard operation
server-client-python copied to clipboard

server.favorites.delete_favorite_flow(user_item, flow_item) returns resource not found (it exists)

Open CodingOnWindowsOS opened this issue 1 year ago • 0 comments

Describe the bug server.favorites.delete_favorite_flow results in server response error 404005. The flow and corresponding project exist and can be found using server.projects and server.flows.

Versions Details of your environment, including:

  • Tableau Server version: 2022.1
  • Python version: Python 3.9.12
  • TSC Version: 3.15

To Reproduce import tableauserverclient as tsc

Setup

token_name = 'some_token_name' token_value = 'some_token_value' tableau_auth = tsc.PersonalAccessTokenAuth(token_name=token_name, personal_access_token=token_value) server = tsc.Server('some_server') server.add_http_options({'verify': False})

with server.auth.sign_in(tableau_auth): server.use_highest_version() user = server.users.get_by_id('some_user_id') server.users.populate_favorites(user) for flow in user.favorites['flows']: server.favorites.delete_favorite_flow(user, flow)

Results ServerResponseError:

404005: Resource Not Found
	Project 'c54fa021-3177-4cb8-8c1a-de2a4e2e02c9' could not be found.

CodingOnWindowsOS avatar May 23 '23 17:05 CodingOnWindowsOS