Skip to content

Issue publishing one workbook but not others #1139

@cmbramwell

Description

@cmbramwell

I'm trying to publish a set of workbooks via the Tableau Server Client. All of the workbooks that I'm publishing are working perfectly as expected except for one. The workbook that is not publishing correctly is connected to three separate published data sources. The other workbooks that are publishing correctly are connected to a variety of published and live data sources.

Versions

  • Tableau Online
  • Python 3.7

To Reproduce

upload_dF = pd.read_excel(fullpath + 'Tableau Input.xlsx', sheet_name='Upload')

for row in upload_dF.itertuples():

    server_name = row.server
    project_id = row.project_id
    name = row.name
    workbook_path = row.filepath

    config = tableau_config[server_name]

    tableau_auth = TSC.PersonalAccessTokenAuth(
        config['personal_access_token_name'],
        config['personal_access_token_secret'],
        site_id=config['site_name'])
    server = TSC.Server(config['server'], use_server_version=True)

    with server.auth.sign_in(tableau_auth):

        print(server_name + '-' + name)

        connection_credentials = TSC.ConnectionCredentials(
            conn_username,
            conn_password,
            embed=True,
            oauth=True)

        WorkbookItem = TSC.WorkbookItem(
            name=name,
            project_id=project_id,
            show_tabs=True
        )

        try:

            new_workbook = server.workbooks.publish(
                WorkbookItem,
                workbook_path,
                mode='Overwrite',
                # connections=dest_connections,
                connection_credentials=connection_credentials,
                skip_connection_check=True,
                as_job=False
            )
            print('Published Destination Connections')

        except:
            new_workbook = server.workbooks.publish(
                WorkbookItem,
                workbook_path,
                mode='Overwrite',
                connections=None,
                skip_connection_check=True,
                as_job=False
            )
            print('Published without Destination Connections')

        print("Successfully published {0} ({1})".format(new_workbook.name, new_workbook.id))

Results

tableauserverclient.server.endpoint.exceptions.ServerResponseError: 

	500000: Forbidden
		User does not have permission for action.(The server encountered an error and cannot complete your request. Contact your server administrator.)

I am the site administrator and I have full admin access to all properties on the site.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughelp wantedA user needs help, may be a mistake, a bug or a feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions