tableau / document-api-python

Create and modify Tableau workbook and datasource files
https://tableau.github.io/document-api-python/
MIT License
333 stars 178 forks source link

.twbx files not being recognised as such #212

Closed cjw1980 closed 3 years ago

cjw1980 commented 3 years ago

https://github.com/tableau/document-api-python/blob/805957e028b58a70c8289b1d556350dc8b97f7e0/tableaudocumentapi/xfile.py#L26

We are seeing an issue where a twbx file (created in Tableau 2020.4.4 and uploaded to a server of the same version) is failing the test zipfile.iszipfile(filename), which is producing a subsequent error because this method goes on to try to treat the file as xml.

Traceback (most recent call last):
  File "/Users/xxxx/.pyenv/versions/3.9.0/lib/python3.9/xml/etree/ElementTree.py", line 580, in parse
    self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: no element found: line 1, column 0