Skip to content

Error publishing large twbx files #754

Closed

Description

@AnandShiva

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. And also it works for smaller workbooks, even with extracts.

Activity

  1. bcantoni commented on Dec 7, 2020

    @bcantoni
    Contributor

    @AnandShiva thanks for reporting this. Can you confirm what version of Tableau Server you are connecting to?

    Also, do you have a sense of what size is causing you the problem? If nothing else, maybe you can give the size of the one which fails and the size of a smaller one which passes.

  2. AnandShiva commented on Dec 7, 2020

    @AnandShiva
    Author

    @bcantoni I tried with the file of size 800MB and it failed. When I tried with a workbook of 70 MB it passed.
    I am facing this issue with the latest 0.14 version of the package. The tableau server is the 2020.03 version.

  3. bcantoni commented on Dec 7, 2020

    @bcantoni
    Contributor

    Ok thanks, that's helpful.

    This might be related to changes which came in to 0.14 via #704.

  4. avishaymahluf commented on Dec 8, 2020

    @avishaymahluf

    Hi,
    I'm hitting the same issue when trying to publish a large hyper file (1.2GB).
    client version - 0.14, server version - 2020.3.1.

  5. noobling commented on Dec 8, 2020

    @noobling

    Do we have a resolution for this? It renders the package pretty unusable...

  6. bcantoni commented on Dec 8, 2020

    @bcantoni
    Contributor

    I can repro this as well. It seems like any file >64MB will trigger this, so this path likely wasn't tested as part of #704.

    A possible workaround until this is fixed is to stick with v0.13 of the library.

  7. AnandShiva commented on Dec 8, 2020

    @AnandShiva
    Author

    One thing which I am doing to still keep using the 0.14 package and still not face the issue is, create a small size twbx extract workbook file (~70MB) pointing to a temp smaller data source, change the data source to actual data source programmatically via tableau document API, and publish that.
    After publishing trigger workbook refresh via server.workbooks.refresh(workbook) which will update the workbook to larger data source extract clearing older smaller data source.

    Or of course, you can just do pip3 install tableauserverclient==0.13 and continue what you are doing anyway.

  8. added 3 commits that reference this issue on Dec 9, 2020
  9. shinchris commented on Dec 10, 2020

    @shinchris
    Contributor

    Fix for this is released with v0.14.1.

  10. added a commit that references this issue on Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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