Skip to content

server.workbooks.refresh not accepting the correct parameter #562

@nicoleLaczny

Description

@nicoleLaczny

So my code is refreshing data sources and workbooks, I am able to refresh the data source with no issues doing:
all_datasources, pagination_item = server.datasources.get() try: location = [datasource.name for datasource in all_datasources].index(dataSourceName) datasource = all_datasources[location] refreshData = server.datasources.refresh(datasource)

BUT applying the same logic to:
all_workbooks, pagination_item = server.workbooks.get() try: location = [workbook.name for workbook in all_workbooks].index(workbookName) workbook = all_workbooks[location] workbook2 = server.workbooks.refresh(workbook)

i get this error:
404006: Resource Not Found Workbook '<tableauserverclient.models.workbook_item.WorkbookItem object at 0x000002970D233358>' could not be found.

and when looking at workbook = server.workbooks.refresh() this happens: TypeError: refresh() missing 1 required positional argument: 'workbook_id'

but in the documentation (https://tableau.github.io/server-client-python/docs/api-ref#workbooks) for workbooks refresh, the pass in parameter should be workbook_item

why are the arguments different? shouldn't server.workbooks.refresh() require workbook_item not 'workbook_id'?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions