-
-
Notifications
You must be signed in to change notification settings - Fork 368
Open
Labels
bugPotential issues with the zarr-python libraryPotential issues with the zarr-python library
Description
Zarr version
v3.1.3
Numcodecs version
v0.16.3
Python Version
3.12.10
Operating System
Linux
Installation
using uv
Description
Calling the exists method on a ZipStore instance for an existing ZIP file raises the exception AttributeError: 'ZipStore' object has no attribute '_lock'. It seems this is because the method is not protected by a block
if not self._is_open:
self._sync_open()as seen elsewhere in the code. If this was simply an omission it should be an easy fix, I can open a PR if you want.
Thanks a lot for the great library!
Steps to reproduce
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "zarr@git+https://github.com/zarr-developers/zarr-python.git@main",
# ]
# ///
#
# This script automatically imports the development branch of zarr to check for issues
from zarr.storage import ZipStore
from zipfile import ZipFile
import asyncio
ZipFile("/tmp/tmp.zip", "w").close()
async def main():
with ZipStore("/tmp/tmp.zip", mode="r") as store:
return await store.exists("somekey")
asyncio.run(main())Additional output
No response
Metadata
Metadata
Assignees
Labels
bugPotential issues with the zarr-python libraryPotential issues with the zarr-python library