FMU export error -- Class not found

1 post / 0 new
umutcanuguz
Offline
Joined: 2017-05-18
FMU export error -- Class not found

 

I have been trying to export a model from a custom library. I built it in OpenModelica and it is possible to export from OpenModelica and I am getting consistent result for ME2 exports. Therefore, I think the model itself does not have a problem related to this export error. I already read the documentation(I hope i didn't miss anything) and some similar questions.

 

from pymodelica import compile_fmu

model_name = 'myModel'
mo_file = 'C:/~/myPackage/myModelFile.mo'

my_fmu = compile_fmu(model_name, mo_file)

 

Then I am getting the error:

Syntactic error at line 90, column 3:
Unexpected token: "annotation"

 

This annotation at line 90 is simply for simulation settings that I wrote in Openmodelica, just a start, stop time etc. When I comment out this line, I am getting following error:

pymodelica.compiler_exceptions.ModelicaClassNotFoundError: Class MyModel not found

Getting this error just after the previous error does not make any sense at all.