[Python4Capella] Problem with relative path for open() method


I am trying to use Python4Capella to execute scripts for the first time.

But my capella git repository is not located in my workspace, it is located in another folder in my file system.

I tried to use a relative path in the aird_path variable, but the open() method is not working which seems to be normal as getWorkspaceFile() method is working only with path in the workspace.

The console return that : AttributeError: the .aird file doesn’t exist: …/…/…/model/model.aird

Do you know how to use relative path with eclipse so that I could open a model that is not in my workspace repository but somewhere else in my file system ?


The Capella project needs to be in the Capella workspace in order to be opened correctly. You need to import the project first.

You can open the git perspective:


add your repository:


Select your project from the working tree and right click to import it. Then you can use something like:


If your project name is model.

Thank you for you answer, Indeed it worked !

Still, is it normal that I do not see the capella project in my workspace in my file system ? I thought I would see it in the workspace

You can reference projects from external directory which is what egit is doing in order to keep the project in the git repository working tree. You can also import a project from a zip file or copy it on import. In this case the project will be present in the workspace folder.