Support Python 3.7

Description

To reproduce:

Create a table in Synapse
Retrieve it with syn.tableQuery
Modify the table in the web client
Retrieve it again with syn.tableQuery

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 table = syn.tableQuery("SELECT * FROM syn15667293") [####################]100.00% 1/1 Done... Traceback (most recent call last): File "/Users/gros47/Sage/synapsePythonClient/synapseclient/client.py", line 1854, in _downloadFileHandle os.makedirs(os.path.dirname(destination)) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/os.py", line 221, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/Users/gros47/.synapseCache/667' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/gros47/Sage/synapsePythonClient/synapseclient/client.py", line 2876, in tableQuery return CsvFileTable.from_table_query(self, query, **kwargs) File "/Users/gros47/Sage/synapsePythonClient/synapseclient/table.py", line 1538, in from_table_query includeRowIdAndRowVersion=includeRowIdAndRowVersion) File "/Users/gros47/Sage/synapsePythonClient/synapseclient/client.py", line 3044, in _queryTableCsv 'TableEntity', cache_dir) File "/Users/gros47/Sage/synapsePythonClient/synapseclient/client.py", line 1856, in _downloadFileHandle if exception.errno != os.errno.EEXIST: AttributeError: module 'os' has no attribute 'errno' >>> >>> df = table.asDataFrame() Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'table' is not defined >>> table = syn.tableQuery("SELECT * FROM syn15667293") Traceback (most recent call last): File "/Users/gros47/Sage/synapsePythonClient/synapseclient/client.py", line 1854, in _downloadFileHandle os.makedirs(os.path.dirname(destination)) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/os.py", line 221, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/Users/gros47/.synapseCache/667' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/gros47/Sage/synapsePythonClient/synapseclient/client.py", line 2876, in tableQuery return CsvFileTable.from_table_query(self, query, **kwargs) File "/Users/gros47/Sage/synapsePythonClient/synapseclient/table.py", line 1538, in from_table_query includeRowIdAndRowVersion=includeRowIdAndRowVersion) File "/Users/gros47/Sage/synapsePythonClient/synapseclient/client.py", line 3044, in _queryTableCsv 'TableEntity', cache_dir) File "/Users/gros47/Sage/synapsePythonClient/synapseclient/client.py", line 1856, in _downloadFileHandle if exception.errno != os.errno.EEXIST: AttributeError: module 'os' has no attribute 'errno'

Environment

Python 3.7

Status

Assignee

Kimyen Truong

Reporter

Nick Grosenbacher

Labels

None

Validator

Robert Allaway

Release Version History

None

Fix versions

Affects versions

py-1.8.2

Priority

Major
Configure