- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Pyfmi, OpenModelica FMU, and IPython...
Pyfmi, OpenModelica FMU, and IPython (JSON involved)
Pyfmi, OpenModelica FMU, and IPython (JSON involved)
Trying to load an FMU compiled by omc (OpenModelica's compiler) provoke a nasty crash under IPython.
Running
import pyfmi
pyfmi.load_fmu("path/to/fmu")
makes IPython crash with message
JSON object expected ',' or '}', got: "lineEnd":67,"colSta
Aborted (core dumped)
I tried both IPython 5.4 and 4.2, for Python 2.7.13 (Anaconda 64-bit) on Ubuntu 16.04.
An example FMU for reproducing the bug can be found here:
https://trac.fmi-standard.org/browser/b … ontrol.fmu
This seems to be specific to OpenModelica as a JModelica compiled FMU (https://trac.fmi-standard.org/browser/b … ature.fmu) does not trigger the error.
Both FMUs pass the FMU compliance check.
Do you have any idea about the problem's root and how to solve it?
I already experienced segfaults with older version of OpenModelica, as mentionned here: http://www.jmodelica.org/27816. They were however rare enough to be only a nuisance, not a show stopper.
Re: Pyfmi, OpenModelica FMU, and IPython (JSON involved)
Your links are broken
- sjoelund.se
- 1700 Posts
Re: Pyfmi, OpenModelica FMU, and IPython (JSON involved)
Hi
Several years since you posted this problem.
But I have come across bout the same thing.
Discussed at Stackoverflow, see
https://stackoverflow.com/questions/595 … untu-18-04
If you have got a solution I would appreciate to know it!
Jan Peter
Re: Pyfmi, OpenModelica FMU, and IPython (JSON involved)
If comma is used as a decimal separator the FMU loading will crash. Set locale to en_US should fix it.
Code:
import locale
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
- adrpo
- 885 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Pyfmi, OpenModelica FMU, and IPython...