Error in downloadTableColumns for file view

Description

The example for downloadTableColumns was:

results = syn.tableQuery('SELECT * FROM syn12345 LIMIT 100 OFFSET 100')
file_map = syn.downloadTableColumns(results, ['foo', 'bar'])

Following the example, I see:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 >>> table = syn.tableQuery("SELECT * FROM syn12137225 WHERE ((\"study\"='iPSC') AND (\"assay\"='rnaSeq'))") Create CSV FileHandle [####################]100.00% 2554/2554 Done... Downloading [####################]100.00% 343.5kB/343.5kB (180.0kB/s) Job-61017986152845219822443712.csv Done... >>> >>> table.headers [{'id': '2510', 'name': 'id', 'columnType': 'ENTITYID'}, {'id': '23543', 'name': 'name', 'columnType': 'STRING'}, {'id': '60120', 'name': 'consortium', 'columnType': 'STRING'}, {'id': '59617', 'name': 'grant', 'columnType': 'STRING'}, {'id': '37438', 'name': 'study', 'columnType': 'STRING'}, {'id': '37283', 'name': 'assay', 'columnType': 'STRING'}, {'id': '67972', 'name': 'assayTarget', 'columnType': 'STRING'}, {'id': '36222', 'name': 'organ', 'columnType': 'STRING'}, {'id': '67973', 'name': 'tissue', 'columnType': 'STRING'}, {'id': '67977', 'name': 'nucleicAcidSource', 'columnType': 'STRING'}, {'id': '67975', 'name': 'cellType', 'columnType': 'STRING'}, {'id': '67974', 'name': 'terminalDifferentiationPoint', 'columnType': 'STRING'}, {'id': '67976', 'name': 'specimenID', 'columnType': 'STRING'}, {'id': '37384', 'name': 'fileFormat', 'columnType': 'STRING'}, {'id': '4694', 'name': 'createdOn', 'columnType': 'DATE'}, {'id': '37382', 'name': 'createdBy', 'columnType': 'USERID'}, {'id': '23550', 'name': 'dataFileHandleId', 'columnType': 'FILEHANDLEID'}, {'id': '37485', 'name': 'individualID', 'columnType': 'STRING'}] >>> >>> download = syn.downloadTableColumns(table, 'dataFileHandleId') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/synapseclient/client.py", line 3216, in downloadTableColumns file_handle_associations, file_handle_to_path_map = self._build_table_download_file_handle_list(table, columns) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/synapseclient/client.py", line 3294, in _build_table_download_file_handle_list for row in table: File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/synapseclient/table.py", line 1716, in iterate_rows yield cast_values(row, headers) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/synapseclient/table.py", line 440, in cast_values raise ValueError('Each field in the row must have a matching column header. %d fields, %d headers' % (len(values), len(headers))) ValueError: Each field in the row must have a matching column header. 21 fields, 18 headers >>> synapseclient.__version__ '1.8.1'

Environment

None

Status

Assignee

Kimyen Truong

Reporter

Kimyen Truong

Labels

None

Validator

Kenneth Daily

Release Version History

None

Fix versions

Affects versions

py-1.8.1

Priority

Major