Skip to content

update_connection() returned 400033 Bad Request #1305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rng-spokeo opened this issue Oct 23, 2023 · 3 comments
Open

update_connection() returned 400033 Bad Request #1305

rng-spokeo opened this issue Oct 23, 2023 · 3 comments
Labels

Comments

@rng-spokeo
Copy link

Describe the bug
I'm trying to loop thru all the datasource/workbook connections and update the connection password. However, it will randomly returned 400033: Bad Request. Sometime, it works for more than 5 connections but sometime only works for 1 connection.

This was working before Oct 13th.

Versions
Tableau Server version (or note if using Tableau Online) - Tableau Online 2023.3.0 (20233.23.1012.1548) 64-bit Linux
Tableau Pod: us-west-2b
Python version: 3.9.13
TSC library version: 0.28

To Reproduce


tableau_auth = TSC.PersonalAccessTokenAuth(<token_name>, <token_pw>, site_id=<tableau_site_id>)
server = TSC.Server(<tableau_server_address>, use_server_version=True)

with server.auth.sign_in(tableau_auth):
    for datasource in TSC.Pager(server.datasources.get):
        for item,conn in enumerate(datasource.connections):
            connection = datasource.connections[item]
            connection.embed_password = True
            connection.server_address = <connection_server_address>
            connection.username = <connection_server_username>
            connection.password = <connection_server_password>
            server.datasources.update_connection(datasource, connection)

    for workbook in TSC.Pager(server.workbooks.get):
        for item,conn in enumerate(workbook.connections):
            connection = workbook.connections[item]
            connection.embed_password = True
            connection.server_address = <connection_server_address>
            connection.username = <connection_server_username>
            connection.password = <connection_server_password>
            server.workbooks.update_connection(workbook, connection)

Results

  File ".../tableauserverclient/server/endpoint/endpoint.py", line 292, in wrapper
    return func(self, *args, **kwargs)
  File ".../tableauserverclient/server/endpoint/datasources_endpoint.py", line 165, in update_connection
    server_response = self.put_request(url, update_req)
  File ".../tableauserverclient/server/endpoint/endpoint.py", line 239, in put_request
    return self._make_request(
  File ".../tableauserverclient/server/endpoint/endpoint.py", line 166, in _make_request
    self._check_status(server_response, url)
  File ".../tableauserverclient/server/endpoint/endpoint.py", line 189, in _check_status
    raise ServerResponseError.from_response(server_response.content, self.parent_srv.namespace, url)
tableauserverclient.server.endpoint.exceptions.ServerResponseError: 

	400033: Bad Request
		There was a problem updating connection information for datasource 'xxxxxxxxxxxxx'.
@CodingOnWindowsOS
Copy link

You're not alone on these... I'm also getting errors like this when trying to create subscriptions.
400063: Bad Request
errors.bad_request.detail.generic_create_subscription

It seems all of my scripts related to subscription items no longer work but were working earlier this week and last month.

@Rishav-dev-star
Copy link

Rishav-dev-star commented Nov 29, 2023

@rng-spokeo Have you got the solution for 400033 issue??

@rng-spokeo
Copy link
Author

@Rishav-dev-star No, same error.

@jacalata jacalata added the bug label Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants