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

opening zarr ZipStore requires write access even with mode="r" #269

Closed
hardingnj opened this issue Jun 29, 2018 · 5 comments · Fixed by #660
Closed

opening zarr ZipStore requires write access even with mode="r" #269

hardingnj opened this issue Jun 29, 2018 · 5 comments · Fixed by #660
Milestone

Comments

@hardingnj
Copy link

-rw-r--r-- 1 root user 18M Jun 29 10:11 testzarr.zip
z = zarr.open_group("testzarr.zip", mode="r")

Returns a permissions error.

Version and installation information

Please provide the following:

  • Value of zarr.__version__ 2.2.0
  • Value of numcodecs.__version__ 0.15
  • Version of Python interpreter: 3.6.5
  • Linux njh-OptiPlex-9020 4.10.0-38-generic Filters #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • via conda
@hardingnj
Copy link
Author

Workaround (thanks @alimanfoo)

store = zarr.ZipStore('testzarr.zip', mode='r')
z = zarr.Group(store)

@alimanfoo
Copy link
Member

alimanfoo commented Jun 29, 2018

Thanks @hardingnj.

For reference the problem is that the mode argument is not getting passed down to the code that turns the file path into a store. I.e., at this line where _normalize_store_arg() is called. The normalize_store_arg() function should accept some argument to tell it store should be read only.

@alimanfoo alimanfoo added this to the v2.3 milestone Jan 3, 2019
@jakirkham
Copy link
Member

The first link appears to have gone stale. Do you have a permalink, @alimanfoo?

@alimanfoo
Copy link
Member

I've updated the comment above with permalinks.

@jakirkham
Copy link
Member

Is normalize_store_arg intended to be part of the public API? If not, maybe we can just change clobber to mode.

@jakirkham jakirkham modified the milestones: v2.3, v2.4 Mar 23, 2019
@Carreau Carreau modified the milestones: v2.4, v2.5 Sep 9, 2020
@alimanfoo alimanfoo modified the milestones: v2.5, v2.6 Sep 24, 2020
Carreau added a commit to Carreau/zarr-python that referenced this issue Nov 30, 2020
Closes zarr-developers#269

This only affect the root as _copy does the right thing on recursion.
Carreau added a commit to Carreau/zarr-python that referenced this issue Nov 30, 2020
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

Successfully merging a pull request may close this issue.

4 participants