Skip to content

Azure blob storage prepends a '/' to the blob names when the prefix is None #525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
shikharsg opened this issue Dec 11, 2019 · 2 comments
Closed

Comments

@shikharsg
Copy link
Contributor

Azure blob storage prepends a '/' to the blob names, even when the prefix is None. Code sample:

Minimal, reproducible code sample

This code needs to connect to Azure Blob (the sample below connects to a local emulator)

>>> import zarr
>>> store = zarr.ABSStore('test', prefix=None, blob_service_kwargs={'is_emulated':True})
>>> g = zarr.open_group(store)
>>> ## list all blobs in the container
>>> print([blob.name for blob in store.client.list_blobs('test')])
['/.zgroup']

which shows up in the storage explorer like this:
image

There should ideally be no '/' before the .zgroup and it should look like this:

>>> import zarr
>>> store = zarr.ABSStore('test', prefix=None, blob_service_kwargs={'is_emulated':True})
>>> g = zarr.open_group(store)
>>> ## list all blobs in the container
>>> print([blob.name for blob in store.client.list_blobs('test')])
['.zgroup']

image

Will submit a PR for this in a bit

@tjcrone
Copy link
Member

tjcrone commented Dec 11, 2019

It's not clear to me why you would want .zgroup to be directly under a blob container. The blob container is not a Zarr group.

@shikharsg
Copy link
Contributor Author

Fixed in PR #526

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants