You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
xfile - Issue opening a .twbx containing custom geocoding #134
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:
A suggested fix for this would be to only check for .twb's if the file is a .twb/.twbx.
Darn, I was really hoping to keep that layer clear of too much reliance on the input file extension... but we may have to go back to doing something like that to avoid these types of bugs.
If I'm not mistaken, the .twb or .tds file in a .twbx or .tdsx will always be in the root of the archive. If I'm also not mistaken, all other file are always in a folder. So you could possibly just look at the files in the root to find the file you're looking for. Again not 100% sure this will work, just a suggestion :)
Activity
itsmarco commentedon Mar 24, 2017
Forgot to add: I've tried this with both the development as the master branch version of xfile.py
t8y8 commentedon Mar 27, 2017
Darn, I was really hoping to keep that layer clear of too much reliance on the input file extension... but we may have to go back to doing something like that to avoid these types of bugs.
Thanks for reporting!
itsmarco commentedon Mar 27, 2017
If I'm not mistaken, the .twb or .tds file in a .twbx or .tdsx will always be in the root of the archive. If I'm also not mistaken, all other file are always in a folder. So you could possibly just look at the files in the root to find the file you're looking for. Again not 100% sure this will work, just a suggestion :)
t8y8 commentedon Mar 27, 2017
@itsmarco excellent suggestion, I'll see what I can whip up!