You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On windows, there can be issues with h5py and international characters in the file path. This can be worked around by passing bytes: h5py.File(file_path.encode('utf-8')) or a file-like object: h5py.File(open(file_path, 'rb')).
If threedigrid can be made to accept file-like objects and bytes, users can handle their windows issues themselves.
The text was updated successfully, but these errors were encountered:
arjanverkerk
changed the title
Support str, bytes and file_like objects in GridH5Admin, GridH5ResultAdmin
Support str, bytes and file-like objects in GridH5Admin, GridH5ResultAdmin
Feb 24, 2023
On windows, there can be issues with h5py and international characters in the file path. This can be worked around by passing bytes:
h5py.File(file_path.encode('utf-8'))
or a file-like object:h5py.File(open(file_path, 'rb'))
.However, in threedigrid a bytes file path is not possible here (because the startswith argument is a str): https://github.com/nens/threedigrid/blob/2.0.1/threedigrid/admin/gridadmin.py#L61
And here only str is possible, for more or less the same reason:
https://github.com/nens/threedigrid/blob/2.0.1/threedigrid/admin/gridresultadmin.py#L64
If threedigrid can be made to accept file-like objects and bytes, users can handle their windows issues themselves.
The text was updated successfully, but these errors were encountered: