Closed Tylores closed 4 weeks ago
@AAndersn this is a top level api for the network.graph calls we can easily handle the case where there is non-defined and return None as a response. This would probably be the best course, but I thought I would give you a heads up if that's the way you wanted this to work.
@afisher1 @poorva1209 your input would be valuable as well.
Not an issue anymore. It was an API usage error.
Describe the bug DEBUG:main:<class 'cimgraph.data_profile.rc4_2021.gridappsd_cim_profile_rc4_2021.PowerElectronicsConnection'> DEBUG:main:Traceback (most recent call last): File "/home/tylor/dev/micro-apps/micro-apps/power_factor/power_factor.py", line 491, in
app = PowerFactor(gapps, sim)
File "/home/tylor/dev/micro-apps/micro-apps/power_factor/power_factor.py", line 289, in init
self.mrids, self.electronics = get_power_electronics(self.mrids)
File "/home/tylor/dev/micro-apps/micro-apps/power_factor/power_factor.py", line 219, in get_power_electronics
if not network.graph[PowerElectronicsConnection]:
KeyError: <class 'cimgraph.data_profile.rc4_2021.gridappsd_cim_profile_rc4_2021.PowerElectronicsConnection'>
To Reproduce
Additional context Other models appear to work fine or at least don't crash when there is no connection found.