Skip to content

xfile - Issue opening a .twbx containing custom geocoding #134

Open

Description

@itsmarco

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

Activity

  1. itsmarco commented on Mar 24, 2017

    @itsmarco
    Author

    Forgot to add: I've tried this with both the development as the master branch version of xfile.py

  2. t8y8 commented on Mar 27, 2017

    @t8y8
    Contributor

    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!

  3. itsmarco commented on Mar 27, 2017

    @itsmarco
    Author

    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 :)

  4. t8y8 commented on Mar 27, 2017

    @t8y8
    Contributor

    @itsmarco excellent suggestion, I'll see what I can whip up!

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