Can not modify the model anymore

Good morning,

I am having a problem with my capella model. I am not able to modify it anymore. I am not able to add or modify anything, neither create new diagrams. It seems like it is in a read mode, I can only for instance put already existing requirements in different diagrams, but not able to modify them. Looking at the Project Explorer it seems missing a part. I attach here below the thing I am talking about. The model with which I have problems is called ‘GIT’, whereas ‘HET’ is a new and empty model made for comparison.

I underline the fact that I had this problem after running pydev modules, I was able to modify everything before starting scripting. I try to run the model with a different pc but I am not able to load it as the pc does not find the model. I really do not know where is the issue.

I am using Capella 5.2 with the python 3.7 provided by the guide.

Thank you in advance.

Did you run any python script in particular?
Do you have any error in the error view?
Stephane

Thank you Stephane for your answer.

I am running only a modified version of ‘Export_list_of Requirements_to_xslx’ using json , os and importing the valispace package. I am able to run the code without problems, I am now getting errors due to something I did wrong in the model, which I can not modify as said before. It is simply an error due a requirement written wrongly. But I really have no idea why the model is corrupted.

I got a strange error with the use of both openpyxl and os, but it was something minor and I was able to avoid it in some way.

Thank you again.

If you modified your model with a Python script, this could be your problem’s source. For example, if you opened a transaction without closing it or saving the model with an open transaction.
Not sure what is the course of action here. I suppose that if you close Capella and reopen it, that does not solve the issue?

What I am doing is only manipulating requirements and export them, without touching the model. I simply get the requirements from the model, modify the text and export the to excel.

I tried open and close it, I tried also to open it from another pc, but the problem is the same. It happened to me yet one time with Capella 6.0, I tried to use the 5.2 but it happened again.

And you have nothing in the error log view?

The only error I have is the following.


In a nutshell the error is because I written the requirement in a wrong way, in that my script substitutes a numerical in between the $$, if something is written inside the $$. Here below the requirement giving error.
Immagine 2023-02-21 223816
As there is nothing inside $$ my script returns error. But as you can see, everything above works fine, indeed the requirement before shown in the console has been updated correctly. Hope this is clear

ok, what I meant is do you have something in the error log view, ie Window->Show View->Others and then General->Error Log
Stephane

Oh sorry, really apologize for the misunderstanding. By the way, I have these errors since this morning.


The ones at 23:13 and 23:14 are from two runs I did on the code now

The ones which look suspicious are from 12:46 and 12:45 and before. Can you zip and upload your .log file contained in your .metadata folder in your workspace?

error_log.zip (53.4 KB)
Good morning,

Here you are, hope this is the one you requested.

Thank you a lot for your support.

I was not able to find a reason for the root cause of your problem (but there are a lot of errors related to PYthon on your log file, maybe linked to the openpyxl problem you mentioned).
Nevertheless, there is a clear error why your model won’t open:

  • !MESSAGE org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference ‘08695946-2aa3-46dd-8442-7b1971a22f2d’. (platform:/resource/GIT/GIT.capella, 227, 116)

So what you can do is open the GIT.capella file with a text editor, go to the line, and try to remove the unknown reference in your model by hand. And then, try to open it again after relaunching Capella and refreshing your project. Before doing this, you may want to save your GIT.capella file in some other place.

If you get it back working, you may want to save your file in another place on a regular basis to avoid these kinds of issues. This does not happen in general, but as we did not find the root cause, this may happen again.

I hope this helps.
Stephane

Ok I did an attempt on a copy of the model. I open capella in a text format, and modifying by hand as you said. I did this for all the errors I received once open the file GIT.capella and it worked. As you can see in the picture now I can open the model and modify everything (GIT2 in the picture is the copy with the corrected GIT.capella).

All the errors that were blocking the model were related only to the requirement type and relation type I defined (you can see it highlited in the picture the error and on the left how I defined both relation and type). I really do not know how it could happen but now I am free to work as before. Maybe I did something wrong in the definition of the requirements, but honestly I don’t have any clue.

Many many thanks again for the support.

I am glad it worked. This should not have happened in the first place… But difficult to fix this if we don’t know exactly what happened!
Stephane

Do not worry, relations and types of requirements are minor with all the rest I am doing. I try to define those again and see if they are still causing problems. If so, I would avoid their use for the moment.

Thank you again,
Andrea