GeezerVison is showing github.com — xfile - find_file_in_zip tries to open a non-workbook xml file · Issue #117 · tableau/document-api-python
xfile - find_file_in_zip tries to open a non-workbook xml file #117
Description
Hello,
I was parsing some packaged workbooks with and I encountered a problem. A .twbx I was trying to open had a bunch of .key files in it, which adhere to some xml structure. The function find_file_in_zip tries to pass this xml file on as a .twb, ultimately raising an tableaudocumentapi.xfile.TableauVersionNotSupportedException: 0.0 error.
The workbook is actually a valid workbook, and ended up not getting parsed. Manually excluding .key files fixed the issue for me.
Cheers,
Marco
Activity
t8y8 commented on Dec 5, 2016
@itsmarco would it be possible to attach a workbook that reproduces the issue?
I think I see where the problem is -- we return the first successfully parsed file, because the root_element check happens a layer above. One fix is to only try and parse .twb/.tds files.
itsmarco commented on Dec 6, 2016
@t8y8 unfortunately I cannot. What I can tell you is that the .twbx contains a folder named TwbxExternalCache, which contains two subfolders: TwbxResultsCacheV3 & TwbxTimestampsCacheV3. These folders contains .key & .bin files. A .key file is attached.
.key.txt
added a commit that references this issue
on Dec 12, 2016Fix #117 by only attempting files with the right extension inside the…
This issue will close once commit fb36a3a is merged into the 'master' branch.fb36a3a t8y8 commented on Dec 12, 2016
@itsmarco this should be fixed in the development branch and included in the next release.
Can you give it a quick try to confirm?
itsmarco commented on Dec 12, 2016
@t8y8 Fixed worked. Thanks :)
t8y8 commented on Dec 12, 2016
Awesome! Thank you for verifying!
added a commit that references this issue
on Jan 11, 2017This issue will close once commit 65fbc80 is merged into the 'master' branch.65fbc80
Metadata
Metadata
Development
No branches or pull requestsIssue actions