10000 List workbooks error when Personal Space workbooks exist (missing project_id) · Issue #873 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

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

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

Closed
pschuemann opened this issue Aug 23, 2021 · 5 comments
Labels

Comments

@pschuemann
Copy link
pschuemann commented Aug 23, 2021

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.

@bcantoni bcantoni added the bug label Aug 23, 2021
@bcantoni
Copy link
Contributor

Thanks @pschuemann for reporting this. I too can reproduce it on Tableau Online. We'll do some more digging here to understand what changed.

@bcantoni bcantoni changed the title ValueError: project_id must be defined. List workbooks error when Personal Space workbooks exist (missing project_id) Aug 23, 2021
@bcantoni
Copy link
Contributor

I confirmed with Query Workbooks for Site REST calls directly that workbooks in the new personal space feature do not have project_id or project_name defined. Looks like we'll need to properly handle that in the TSC library and see if any other objects are affected in a similar way.

@adeturckheim
Copy link

Hi there, facing this problem too.
No issue with Projects, Users and Views

@TomKlotzPro
Copy link

Hello @bcantoni, thanks for the fix!
When do you plan to release this fix?

@jacalata
Copy link
Contributor
jacalata commented Nov 8, 2021

This was released in 0.17 in October https://github.com/tableau/server-client-python/releases/tag/v0.17.0

@jacalata jacalata closed this as completed Nov 8, 2021
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

5 participants
0