Skip to content

Error handling for duplicate column header values is broken. #10

Description

@raids

Hi there,

I receive the following error when performing .data() on a sheet which has 2 columns with the same value:

Traceback (most recent call last):
  File "read/read_data.py", line 15, in <module>
    key_column_headers=["AWS Account"])
  File "/Users/raid/Projects/sheetsync/venv/lib/python2.7/site-packages/sheetsync/__init__.py", line 413, in __init__
    self._get_or_create_headers()
  File "/Users/raid/Projects/sheetsync/venv/lib/python2.7/site-packages/sheetsync/__init__.py", line 706, in _get_or_create_headers
    self.header.set(cell.col, cell.value)
  File "/Users/raid/Projects/sheetsync/venv/lib/python2.7/site-packages/sheetsync/__init__.py", line 227, in set
    self.header_row_ix,  self.sheet_name))
AttributeError: 'Header' object has no attribute 'header_row_ix'

I guess this is because python dictionaries don't support duplicate keys, but is there any way duplicate column header values can be handled?

Cheers!

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions