Closed manics closed 4 years ago
The last commit fails on Python 2.7 with the inexplicable error:
def arrays(self):
"""
Check for strings longer than the initialised column width
"""
for v in self.values:
> if sys.version_info >= (3, 0, 0):
E AttributeError: 'module' object has no attribute 'version_info'
https://travis-ci.org/ome/omero-py/jobs/620734836 Python 3 is fine, and the code works fine in the rest of omero-py ¯\_(ツ)_/¯
There is also an omero.sys
module which is likely what Py2 is picking up. There are existing import gymnastics to handle that.
(Title is probably also a bit off now, eh? 🙂)
It might be possible to simplify this by moving the conversion into StringColumnI.arrays()
so bytes are always returned. This assumes arrays()
isn't used anywhere else.
See last commit on https://github.com/ome/omero-py/pull/145/ re the last comment
Replacement for https://github.com/ome/omero-py/pull/133
See comment in hdfstorageV2.HdfStorage.append (https://github.com/ome/omero-py/commit/9e1d8e00873f76a2a2972a0c96de1494639c9c48) for the full explanation
Probably needs a doc update to say string column sizes must be given as the number of bytes not the number of unicode characters.