You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when trying to apply a new property value that includes an enum to a physical component I encounter the following error:
Traceback (most recent call last):
File "c:\Users\xx\Workspace\Dokumente\00_Repositories\snippet-roundtrip-engineering\demo\ICA_6U_Power_Modules\pvmt_test.py", line 8, in <module>
pv_allocation = pvext.get_element_pv(model.pa.all_components.by_name("PC 1")._element, "PVMT_Test.Extension", create=True)
File "C:\Users\xx\Workspace\Dokumente\00_Repositories\snippet-roundtrip-engineering\demo\venv\lib\site-packages\capellambse\pvmt\model.py", line 167, in get_element_pv
child = AppliedPropertyValueGroup.applyto(self, element, groupname)
File "C:\Users\xx\Workspace\Dokumente\00_Repositories\snippet-roundtrip-engineering\demo\venv\lib\site-packages\capellambse\pvmt\types.py", line 373, in applyto
].applyto(pvmt_ext, defelem, xml_element, propelem)
File "C:\Users\xx\Workspace\Dokumente\00_Repositories\snippet-roundtrip-engineering\demo\venv\lib\site-packages\capellambse\pvmt\types.py", line 204, in applyto
super().applyto(pvmt_ext, defelem, modelobj, targetelem)
TypeError: super(type, obj): obj must be an instance or subtype of type
When applying a PV that only contains a string everything works fine.
I build a minimal model to test this. The code looks like this:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
when trying to apply a new property value that includes an enum to a physical component I encounter the following error:
When applying a PV that only contains a string everything works fine.
I build a minimal model to test this. The code looks like this:
And the PV configuration in the Capella Model like this:
Maybe I am also missing something here.
Thank you,
Janis
PS: I really enjoy working with the capellambse package. Great work!
Beta Was this translation helpful? Give feedback.
All reactions