-
Notifications
You must be signed in to change notification settings - Fork 444
Closed
Description
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)))