Skip to content

Error that type already exists during typesystem load #322

@UWinch

Description

@UWinch

Describe the bug
I have a typesystem that contains a type without namespace e.g. TestType and one with namespace e.g. my.cool.TestType. When I try to load the typesystem from xml, I sometimes get a ValueError: Type with name [TestType] already exists! . I think this happens when the type with the longer name has already been added to the typesystem during creation and the shorter one is about to be added. In

if self.contains_type(name) and not is_predefined(name):
contains_type evaluates to True because the contains method checks shortname retrieval of the type.

To Reproduce
Steps to reproduce the behavior:

  1. Have a typesystem containing the type my.cool.TestType
  2. Try creating the type TestType

Please complete the following information:

  • Version: 0.10.0
  • OS: Linux

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions