tableau_tools icon indicating copy to clipboard operation
tableau_tools copied to clipboard

tableau_datasource.py - extra null check needed before calling self.read_existing_relations()?

Open ghost opened this issue 8 years ago • 1 comments

I recently used the tableau_tools library to do automated translations of field labels and ran into this issue.

When running the translate_columns operation, I would encounter an error. The error would occur at the self.read_existing_relations() call. In this operation, the object self.relation_xml_obj is used. However, within the operation there is no check to see if this object actually exists. Apparently, after reading my workbook, this object would have value None.

Proposed solution: add a check to see if self.read_existing_relations() is None before running the self.read_existing_relations() operation or perform this check within the operation.

ghost avatar Nov 23 '17 15:11 ghost

Hi - can you check with a recent version of the library and still if this error still persists? I'm trying to think of how a workbook wouldn't have any existing relations

bryanthowell-tableau avatar Oct 16 '18 21:10 bryanthowell-tableau