diff --git a/src/zarr/api/asynchronous.py b/src/zarr/api/asynchronous.py index acae566fc..f3841be08 100644 --- a/src/zarr/api/asynchronous.py +++ b/src/zarr/api/asynchronous.py @@ -1090,7 +1090,7 @@ async def open_array( try: return await AsyncArray.open(store_path, zarr_format=zarr_format) except FileNotFoundError: - if not store_path.store.readonly: + if not store_path.readonly: return await create( store=store_path, zarr_format=zarr_format or _default_zarr_version(), diff --git a/src/zarr/core/array.py b/src/zarr/core/array.py index 72c22611b..870d902c8 100644 --- a/src/zarr/core/array.py +++ b/src/zarr/core/array.py @@ -772,7 +772,7 @@ def read_only(self) -> bool: True if the array is read-only """ # Backwards compatibility for 2.x - return self.store_path.store.readonly + return self.store_path.readonly @property def path(self) -> str: diff --git a/src/zarr/core/group.py b/src/zarr/core/group.py index 683f7b936..62eebe0f0 100644 --- a/src/zarr/core/group.py +++ b/src/zarr/core/group.py @@ -815,7 +815,7 @@ def store(self) -> Store: @property def read_only(self) -> bool: # Backwards compatibility for 2.x - return self.store_path.store.readonly + return self.store_path.readonly @property def synchronizer(self) -> None: