You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression: FsspecStore over ReferenceFileSystem fails with GroupNotFoundError (path '/' joined as '//key') #3922
zarr.open_group on an FsspecStore wrapping fsspec.implementations.reference.ReferenceFileSystem raises GroupNotFoundError on current main, even though the reference set contains a valid zarr.json.
This appears to be a regression from #3679 (be0a7b8), which in FsspecStore._get replaced
path=_dereference_path(self.path, key)
with
path=_join_paths([self.path, key])
These differ when self.path == "/" (which is what FsspecStore(fs=ReferenceFileSystem(...)) ends up with):
_dereference_path("/", "zarr.json") → "zarr.json" (root is rstrip("/")ed to "", so no prefix is added)
_join_paths(["/", "zarr.json"]) → "//zarr.json" (only empty strings are filtered, so "/" is kept and joined with "/")
ReferenceFileSystem keys its refs by bare "zarr.json", so the lookup misses, _get raises FileNotFoundError, and open_group turns that into GroupNotFoundError.
Local-filesystem-backed FsspecStores aren't affected because their self.path is the full filesystem path (not "/"), so the extra slash never appears.
zarr version: 3.1.7.dev45+g866aa8d67
store: <FsspecStore(ReferenceFileSystem, /)>
store.path: '/'
_join_paths([store.path, "zarr.json"]) = '//zarr.json'
...
zarr.errors.GroupNotFoundError: No group found in store <FsspecStore(ReferenceFileSystem, /)> at path ''
Expected behavior
Same as on zarr 3.1.6: the group is opened successfully.
as a post-mortem: #3679 consolidated some internal path-handling routines, and also made more clear what those routines should do (combine path segments) and what they should not do (normalize path segments). This issue shows that those changes revealed a longstanding bug in fsspecstore, for which we did not have test coverage, wherein the user-provided input for the path attribute was taken as-is without any normalization.
Activity
d-v-b commentedon Apr 23, 2026
Thanks for reporting this! We should get this fixed shortly
d-v-b commentedon Apr 24, 2026
as a post-mortem: #3679 consolidated some internal path-handling routines, and also made more clear what those routines should do (combine path segments) and what they should not do (normalize path segments). This issue shows that those changes revealed a longstanding bug in fsspecstore, for which we did not have test coverage, wherein the user-provided input for the
pathattribute was taken as-is without any normalization.fix(storage): preserve leading slashes in FsspecStore.path (#3926)