Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support str, bytes and file-like objects in GridH5Admin, GridH5ResultAdmin #183

Open
arjanverkerk opened this issue Feb 24, 2023 · 0 comments

Comments

@arjanverkerk
Copy link

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.

@arjanverkerk 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant