Skip to content

Improve Error when opening Detached Label #75

Description

@percurnicus

There should be a better error when attempting to open a detached label image with the image file rather than the label file. This is the most common error I come across:

    121         if isinstance(key, INDEX_TYPES):
    122             return self.__items[key]
--> 123         return dict_getitem(self, key)[0]
    124 
    125     def __delitem__(self, key):

KeyError: '^IMAGE'

Which doesn't really explain to me that there is a detached label I should open. I don't have any immediate ideas on how to make this more explicit. In a perfect world, we would search for the label file ourselves but since there is a lack of consistency in the extensions, I don't see how my perfect world can exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions