Skip to content

ObjectStoreRegistry fails with fsspec store #739

@groutr

Description

@groutr

When trying to use fsspec in the object store registry in virtualizarr 2.0, it fails because a function is passed to urlparse instead of a string. I want to use fsspec instead of obstore to make the requests to S3. Looking at the code, it seems like it was anticipated that an fsspec filesystem would be used in the registry because of the checking for the url attribute. Am I misunderstanding something or doing something wrong?

Problematic line (store.url is a method)
https://github.com/zarr-developers/VirtualiZarr/blob/main/virtualizarr/registry.py#L257

Reproducible example:

from virtualizarr.registry import ObjectStoreRegistry
import fsspec

registry = ObjectStoreRegistry()
S3 = fsspec.filesystem('s3')
registry.register("s3://globalnightlight", S3)
registry.resolve("s3://globalnightlight/201204") # Raises an AttributeError

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestremote filesReading references from non-local files

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions