While publishing a large twbx file with latest 0.14 version of tableau-server-client using the below code,
wb_item = server.workbooks.publish(wb_item,target_file,'Overwrite')
i am getting the following error.
File "/usr/local/lib/python3.9/site-packages/tableauserverclient/server/endpoint/fileuploads_endpoint.py", line 45, in read_chunks
chunked_content = file.read(CHUNK_SIZE)
ValueError: read of closed file
The same code works for 0.13 and below versions. I cannot downgrade to lower versions since i want to use some latest tableau REST API endpoints ( eg latest API - server.workbooks.refresh(workbook))
This is a basic use-case of publishing a large workbook with extract, so anyone solutions or fixes to this issue is highly appreciated.
Thanks in advance.
Hey Anand,
If this was working on an older version of TSC but not anymore, I'd flag it as a bug so it can be reviewed, you can do this in the Issues tab at Github.
In the meantime, given you are planning on using server.workbooks.refresh(workbook), what if instead of publishing a workbook with a large extract, you try publishing a workbook with an empty extract and then have Tableau Server do the refresh for you? This is a bit of an old article but should still do the trick!
Hope this helps!
Santiago