Open fran-jo opened 7 years ago
I read in "the web" that might be a possible bug of python ... I've just updated to the last 2.7 version and this problem is not present any more... However, natu keeps complaining, now with this:
Traceback (most recent call last):
File "C:\Users\fragom\PhD_CIM\PYTHON\SimuGUI\src\gui\msv_framework_gui.py", line 70, in plotSimulation
simmodel = SimRes('./res/dy/Two_Areas_PSSE_AVR_Noise_dassl_dsin.mat')
File "C:\IDE\Python27\lib\site-packages\modelicares-0.12.2_126_gdab068a-py2.7.egg\modelicares\simres.py", line 956, in __init__
variables = read(fname, constants_only)
File "C:\IDE\Python27\lib\site-packages\modelicares-0.12.2_126_gdab068a-py2.7.egg\modelicares\_io\dymola.py", line 378, in readsim
unit = U._units(**nc.Exponents.fromstr(unit_str))
File "C:\IDE\Python27\lib\site-packages\natu-0.12.2_126_gdab068a-py2.7.egg\natu\core.py", line 1373, in __call__
factors = [self[base] ** exp for base, exp in factors.items()]
File "C:\IDE\Python27\lib\site-packages\natu-0.12.2_126_gdab068a-py2.7.egg\natu\core.py", line 1433, in __getitem__
raise error
KeyError: "MV isn't a valid prefix."
I assume that the variables of the model have to have their units defined. But some models might not properly define the units. Is there any way to bypass this? Or should I require the models to be very-well defined instead?
@kdavies4 Any hints on how to solve this?
Hello again!
I am having this error when importing SimRes
I am reading in "the web" that this issue might come from the re.compile() function. I guess you did not face this issue with the natu library. Any idea?
Edited: I am running the code in Eclipse Mars PyDev, under Windows 7
Cheers!