8000 ValueError: project_id must be defined · Issue #974 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

ValueError: project_id must be defined #974

Copy link
@hanishche

Description

@hanishche

Hi,

I am running into error: ValueError: project_id must be defined.

Below is the code:

tsConn = TableauServerConnection('server_url','Token_name','token','site')
server = TSC.Server(tsConn.server_url, use_server_version=True)
tableau_auth = TSC.PersonalAccessTokenAuth(token_name=tsConn.token_name
                                           ,personal_access_token=tsConn.token_secret
                                           ,site_id=tsConn.site)
with server.auth.sign_in_with_personal_access_token(tableau_auth):
    print('[Logged in successfully to {}]'.format(tsConn.server_url))
    print('[Loading workbooks...]')        
    all_workbooks, pagination_item = server.workbooks.get()
    tableauWB = []
    for workbook in TSC.Pager(server.workbooks.get):
        tableauWB.append(
        (workbook.id
         ,workbook.name
         ,workbook.owner_id
         ,workbook.content_url
          ,'None' if len(workbook.project_id) ==0 else workbook.project_id
         ,workbook.project_name
         ,workbook.size
         ,'None' if len(workbook.tags) ==0 else workbook.tags
         ,pd.to_datetime(str(workbook.created_at)) 
         ,pd.to_datetime(str(workbook.updated_at)) 
         ,workbook.webpage_url       ))

print('[Tableau {} workbooks loaded]'.format(len(tableauWB)))

image

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

      0