Skip to content

List workbooks error when Personal Space workbooks exist (missing project_id) #873

@pschuemann

Description

@pschuemann

Describe the bug
Listing all existing workbooks is failing with an error.

We usually run the following code to find dashboards by name for refresh operations. Since yesterday its failing with a ValueError exception. After some investigation it looks like a workbook in a "Personal Space" is causing it as it doesn't have a project_id nor a project_name. It can be circumvented by patching the code with:

if not project_id:
  continue

to workbook_item.py line 278 and additionally ignoring the server error

tableauserverclient.server.endpoint.exceptions.ServerResponseError:
	400006: Bad Request
		Invalid page number '7'

following it.

Versions
Details of your environment, including:

  • Tableau Online
  • Python v3.9.4
  • tableauserverclient-0.16.0

To Reproduce
Here is the code. It worked fine before the user added the personal workbook:

import tableauserverclient
tableau_auth = tableauserverclient.TableauAuth(...)
server = tableauserverclient.Server(server_address='https://dub01.online.tableau.com/', use_server_version=True)
with server.auth.sign_in(tableau_auth)
  refresh_objs = [o for o in tableauserverclient.Pager(server.workbooks)]

Results

ValueError: project_id must be defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions