xfile - Issue opening a .twbx containing custom geocoding

Open
#134 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Start at find_file_in_zip() and inspect how candidate_files handles .twb and .tds entries in a .twbx containing custom geocoding. Reproduce with a workbook archive containing both file types if possible. Done means .tds files are not evaluated as workbooks and the .twbx opens without TableauInvalidFileException.

Written by the indexing model from the issue text.

Description

bug

Hello,

I was trying to open a 9.3 workbook with custom geocoding attached. find_file_in_zip() evaluates .tds files as well as .twb files when opening a .twbx. A .twbx can contain .tds files if it contains custom geocoding.

I'm not quite sure what determines the order of the filenames in candidate_files, but if a .tds happens to end up before a .tdw in the list, the .tds will be evaluated first as a workbook. This raises the TableauInvalidFileException: filename is not a valid 'workbook' file.

I cannot share the workbook (it contains private data), I can share some screenshots of its contents:
image

image

A suggested fix for this would be to only check for .twb's if the file is a .twb/.twbx.

Cheers,
Marco

Dominant language
Python
Stars
363
Forks
183
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tableau/document-api-python

All issues in tableau/document-api-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.