Closed Aurelien-Pin closed 3 years ago
same applies when trying to have the following iteration: for npc in se.get_physical_architecture().get_physical_component_pkg().get_owned_physical_components():
This issue has been fixed by commit 9864e6ca848ea6c00bd06d097096ea046a13a708.
Trying to execute the following script on the IFE sample model return an error (the error is on the line "for pp in npc.get_contained_physical_ports():")
It should be ensured that similar error will not appear on other relations in the simplified API!
Script:
for npc in se.get_all_contents_by_type(NodePC): npc = NodePC(npc) print ('export of ' + npc.get_name()) for pp in npc.get_contained_physical_ports(): pp = PhysicalPort(pp) print (pp.get_name())
Error:
py4j.Py4JException: An exception was raised by the Python Proxy. Return Message: Traceback (most recent call last): File "C:\Users\T0186002\MyApp\capella 1.4.2 P4C\eclipse\plugins\org.eclipse.ease.lang.python.py4j_0.7.0.I201907020902\pysrc\ease_py4j_main.py", line 186, in runcode exec(compiled, self.locals) File "L/User Scripts/scripts/Need1.py", line 44, in
_pyease_string_types = (str,)
TypeError: iter() returned non-iterator of type 'JavaIterator'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\T0186002\MyApp\capella 1.4.2 P4C\eclipse\plugins\py4j-python_0.10.9.2-bnd-2odeag\src\py4j\clientserver.py", line 581, in _call_proxy return_value = getattr(self.pool[obj_id], method)(*params) File "C:\Users\T0186002\MyApp\capella 1.4.2 P4C\eclipse\plugins\org.eclipse.ease.lang.python.py4j_0.7.0.I201907020902\pysrc\ease_py4j_main.py", line 335, in executeScript return self.executeCommon(code_text, self.interp.runcode, filename) File "C:\Users\T0186002\MyApp\capella 1.4.2 P4C\eclipse\plugins\org.eclipse.ease.lang.python.py4j_0.7.0.I201907020902\pysrc\ease_py4j_main.py", line 313, in executeCommon execution_result = code_exec(code_text, filename) File "C:\Users\T0186002\MyApp\capella 1.4.2 P4C\eclipse\plugins\org.eclipse.ease.lang.python.py4j_0.7.0.I201907020902\pysrc\ease_py4j_main.py", line 213, in runcode except Exception: TypeError: catching classes that do not inherit from BaseException is not allowed