Skip to content

Commit

Permalink
Merge pull request #1360 from girder/zarr-readonly-flag
Browse files Browse the repository at this point in the history
Have zarr use read-only mode
manthey authored Nov 3, 2023
2 parents bc3cbec + 51a4e6c commit 7657a98
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 1.26.1

### Improvements
- Have zarr use read-only mode ([#1360](../../pull/1360))

## 1.26.0

### Features
4 changes: 2 additions & 2 deletions sources/zarr/large_image_source_zarr/__init__.py
Original file line number Diff line number Diff line change
@@ -57,10 +57,10 @@ def __init__(self, path, **kwargs):
if not os.path.isfile(self._largeImagePath) and '//:' not in self._largeImagePath:
raise TileSourceFileNotFoundError(self._largeImagePath) from None
try:
self._zarr = zarr.open(zarr.SQLiteStore(self._largeImagePath))
self._zarr = zarr.open(zarr.SQLiteStore(self._largeImagePath), mode='r')
except Exception:
try:
self._zarr = zarr.open(self._largeImagePath)
self._zarr = zarr.open(self._largeImagePath, mode='r')
except Exception:
if os.path.basename(self._largeImagePath) in {'.zgroup', '.zattrs'}:
try:

0 comments on commit 7657a98

Please sign in to comment.