You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
omc4py stuck in session.buildModel when session.setCommandLineOptions("-d=bltdump") has been set #237
Hi,
When building or simulating a precise model with omc4py using the CommandLineOptions -d=bltdump, the code get stuck. It is not the case without the lineOption.
How to
When building or simulating ThermoSysPro.Examples.SimpleExamples.TestFan_Qin (from ThermoSysPro lib: ThermoSysPro.zip) it is stuck if the flag -d=bltdump has been set.
Excepted behaviour
The behavior should be the same as when -d=bltdump is not set, in this case, buildModel should return '','' as it fails but should not get stuck.
I’ve noticed that some commands tend to hang when using omc --interactive=zmq.
Right now, our code has very limited coverage, so we need to handle many different cases carefully.
Your insights and issues are really helpful for deepening our understanding of how omc behaves.
It might actually be a bug in omc itself.
Even if that’s the case, I’d still like to understand the issue more thoroughly.
We need more detailed log!
And please send your stdout/stderr on script below.
from omc4py import open_session
++ import logging++ logging.getLogger("omc4py").setLevel(logging.DEBUG)++ logging.getLogger("omc4py").addHandler(logging.FileHandler("omc4py.log"))++ # Plese send `omc4py.log` after execute script
model = 'ThermoSysPro.Examples.SimpleExamples.TestFan_Qin'
with open_session(
omc_exec_path
) as session:
print(session.getVersion())
session.loadFile('ThermoSysPro/package.mo')
session.setCommandLineOptions("-d=bltdump")
checkModelLog=session.checkModel(model)
print(checkModelLog)
buildModelResults = session.buildModel(model)
++ session.__check__()
print(buildModelResults)
omc returns Modelica-expression-string as return value
omc4py compile these strings by Modelica syntax, and construct python values
We need to know which is omc's failure or omc4py's failure.
I am not a regular English speaker, and I am using a translation tool to write this response.
If anything is unclear, please let me know and I will rewrite the sentence.
Activity
ijknabla commentedon Jul 20, 2025
I’ve noticed that some commands tend to hang when using
omc --interactive=zmq.Right now, our code has very limited coverage, so we need to handle many different cases carefully.
Your insights and issues are really helpful for deepening our understanding of how omc behaves.
It might actually be a bug in
omcitself.Even if that’s the case, I’d still like to understand the issue more thoroughly.
We need more detailed log!
And please send your stdout/stderr on script below.
We need to know which is omc's failure or omc4py's failure.