Closed Luffy-cpu closed 5 months ago
Hi! That's a somewhat known bug that occasionally happens, and as long as it's only within the *.aird
file it's actually safe to ignore (things change a bit when it comes up in a *.capella
file). You can still load the model by setting this option:
model = capellambse.MelodyModel(
...,
ignore_duplicate_uuids_and_void_all_warranties=True,
)
(Don't worry. It sounds scarier than it is, because when we first discovered it we weren't sure what would happen ourselves. ;) )
@Luffy-cpu , Capella can mess-up models sometimes but it will not complain about it, it will just take an element and go with it (not sure though if first or last XD. If you use capellambse lib to edit models, a model with such issue is "unsafe" for modifications / can get further messed up, you should clean it up first - locate the duplicate elements in XML and choose which of those you want to keep or delete - but at the end there shall only one element remain with that UUID. However, if you are using library to simply check things / read content / produce some reports - not to modify the model - you can do what @Wuestengecko suggested above and simply ignore the duplicates. @Wuestengecko , we may want to update the docs so that it is a bit easier to get on track when you face such exception.
Hello again, Thank you very much @Wuestengecko & @vik378. Both of your answers are very useful for me.
Issue solved :)
Hello everyone,
I'm trying to load a Capella model located in a local git repository and I get the following error message: capellambse.loader.core.CorruptModelError: Duplicate UUID 'XXXX' within fragment My_Model.aird
Can anyone help me fixing the problem, please?
Regards