-
Notifications
You must be signed in to change notification settings - Fork 25
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
mode=r+
: Cannot write to read-only ZArray
#75
Comments
Sorry for this, this is definitely bad documentation/implementation. Mode "w" does not truncate but is actually equivalent to "a". When originally implementing this I was following the mental model of NetCDF modes and only made a difference between Read-only and Read/Write modes and just called them "r" and "w" without thinking a lot. Yes, we should fix this, but this will be breaking in a very nasty way, when silently changing the behavior of "w" to actually truncate the file while in the past it meant "append". So I would suggest to have a full deprecation cycle on this... Will think about it a bit, but please suggest solutions in case you have ideas. |
Ah, thank you! Good to know that I can use “w” for now. Full deprecation cycle makes sense, and perhaps useful to add “a” as an alias in meantime |
This fails:
This also fails for
mode="a"
ormode="a+"
, but works onmode="w"
. Unfortunately, I cannot usemode="w"
as I do not wish to truncate the file, but rather re-open an existing Zarr array for modification. On testing, it appears thatmode="w"
does not actually truncate the.zarr
directory, which I believe conflicts with julia's definition for open modes / is inconsistent with python Zarr.Much appreciate your efforts to bring Zarr to Julia!
The text was updated successfully, but these errors were encountered: