I have installed Python4Capella in Capella 6.0.0. I was following the webinar on Python4Capella. The script for List Logical Components in Console runs fine. One I run Export Capabilities and Owned Scenarios to xlxs the program just runs even the print statement at the start, stating Starting export to Excel" is not displayed on console. I can’t terminate the program so I have to close Capella. Can someone suggest a solution please.
Hi,
Do you have the openpyxl installed in your environment ? Also if you have numpy installed you will need to apply the following patch.
Let me know if it helps. Also do you have any error in the console or the error log view ?
Dear Mr Lussaud,
Thank you for your response. Yes I have openpyxl and also numpy installed. I do not get any error messages. I will be grateful if you can give me a quick run down on how to use this patch.
Best regards
Irfan
Dear Ifran,
You will need to modify the file plugins/org.eclipse.ease.lang.python.py4j_0.7.0.I201907020902/pysrc/ease_py4j_main.py
in you Capella installation. You will need to comment the following lines from line 410 to 412 of the file:
#thread = _pyease_threading.Thread(target=_pyease_watchdog, args=(engine,))
#thread.setDaemon(True)
#thread.start()
This should prevent the freeze.
Dear Mr Lssaud,
Thanks a lot for the update.
Regards
Irfan
Dear Mr Lsaud,
Sorry to keep bothering you, however, I am using Capella 6.0.0 in my system the file ease_py4j_main.py
is in \capella\plugins\org.eclipse.ease.lang.python.py4j_0.8.0.I202104091518\pysrc folder
The specified lines of code are 413 - 415.
Once I commented these lines I started getting the error
org.eclipse.ease.ScriptExecutionException: Traceback (most recent call last):
File “workspace://Python4Capella/sample_scripts/List_logical_components_in_console.py”, line 39, in
if _pyease_sys.version_info.major == 2:
File “workspace://Python4Capella/simplified_api/capella.py”, line 80, in open
list_types=list,
AttributeError: the .aird file doesn’t exist: /In-Flight Entertainment System/In-Flight Entertainment System.aird
I uncommented the lines but still get the error.
I ran the file List_Logical_Components_in_Console.py which was previously running fine now it is also giving the same error.
Can you please help.
Best Regards
Irfan
| YvanLussaud
28 October |
- | - |
Dear Ifran,
You will need to modify the file plugins/org.eclipse.ease.lang.python.py4j_0.7.0.I201907020902/pysrc/ease_py4j_main.py
in you Capella installation. You will need to comment the following lines from line 410 to 412 of the file:
#thread = _pyease_threading.Thread(target=_pyease_watchdog, args=(engine,))
#thread.setDaemon(True)
#thread.start()
This should prevent the freeze.
You need to import the IFE sample project opened in your workspace. The error message tells you that the .aird file could not be found:
AttributeError: the .aird file doesn’t exist: /In-Flight Entertainment System/In-Flight Entertainment System.aird
The project is there before I made the changes the scripts where export to Excel was not involved were running fine. After changing the main file the error has cropped up.
Dear Mr Lassaud,
The problem was resolved after restarting Capella. Thanks a lot for your support. Please note for future reference that in newer versions the folder name and line numbers of Main python file are slightly different, as mentioned in my previous mail. It may help someone facing the problem in future.
Much obliged
Irfan