Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Error with external Python function call from Buildings Library

Error with external Python function call from Buildings Library

Hello all together,

I have been struggling with the problem of interoperability between OpenModelica and Python2.7 for almost 10 hours.
My goal is to run a simulation in OpenModelica and exchange variables with Python at runtime.
The Buildings 3.0.0 Library offers a bundle of functionalities and executable examples for this purpose.
But unfortunately I cannot define and run my own Python scripts, nor can I execute the simple examples of the Buildings Library.
The simulation of Buildings.Utilities.IO.Python27.Functions.Examples.Exchange crashes with the error message
“Simulation process failed. Exited with code -1073741515.”
The log file contains lines colored red:

“In file included from Buildings.Utilities.IO.Python27.Functions.Examples.Exchange_includes.h:4:0,
from Buildings.Utilities.IO.Python27.Functions.Examples.Exchange_functions.c:6:
C:/OpenModelica1.12.0-32bit/lib/omlibrary/Buildings 3.0.0/Resources/C-Sources/python27Wrapper.c: In function 'pythonExchangeValues':
C:/OpenModelica1.12.0-32bit/lib/omlibrary/Buildings 3.0.0/Resources/C-Sources/python27Wrapper.c:28:3: warning: implicit declaration of function 'pythonExchangeValuesNoModelica' [-Wimplicit-function-declaration]
pythonExchangeValuesNoModelica(
^“

I followed the instructions available at https://simulationresearch.lbl.gov/mode … uide.html. I set the environment variables according to the instructions and installed Cygwin and MinGW, although I'm not sure of their necessity.
I tested it with OpenModelica 32 and 64 bit as well as on two different workstations, always with the same error.
Did I miss something? For any kind of help and tips I am grateful.

Edited by: FWend - May-15-18 15:48:46

Re: Error with external Python function call from Buildings Library

I created a ticket at the Buildings github repository for this: https://github.com/lbl-srg/modelica-bui … ssues/1171

Re: Error with external Python function call from Buildings Library

Hello FWend,

Did you make it? I have the same issue.

Sincerely,
Akhtar

There are 0 guests and 0 other users also viewing this topic
You are here: