Skip to content

Raise a better error when an array/store already exists #605

Open
@eric-czech

Description

@eric-czech

It would be helpful for users and downstream libraries if the error thrown when attempting to create an array that already exists on disk was more specific. For example, this error isn't very clear and it isn't easy to wrap in error handling logic:

import zarr
zarr.create((10, 10), store='/tmp/test.zarr')
zarr.create((10, 10), store='/tmp/test.zarr')
# ValueError: path '' contains an array

This could perhaps raise a FileExistsError or at least include a message that describes the condition more clearly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features or improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions