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
OMPython 4 no longer has function FindBestOMCSession.
File \"/OpenModelicaLibraryTesting/testmodel.py\", line 8, in<module>
from OMPython import FindBestOMCSession, OMCSession, OMCSessionZMQ
ImportError: cannot import name 'FindBestOMCSession' from 'OMPython'
We need to fix OMPython to 3.6 or update the scripts to work with 4.0.
Traceback (most recent call last):
File "/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/./test.py", line 666, in <module>
if not omc.sendExpression('loadModel(%s,%s%s)' % (lib,versions,exactMatch)):
File "/usr/local/lib/python3.10/dist-packages/OMPython/OMCSession.py", line 410, in sendExpression
raise OMCSessionException(msg)
OMPython.OMCSession.OMCSessionException: [OMC log for 'sendExpression(loadModel(IDEAS,{"master"}), True)']: [syntax:error:2] No viable alternative near token: break
Command exited with non-zero status 1
I think I have a fix, but at the same time the scripts print so many errors it's very hard to tell what's going on.
I'll give it a final try to get the scripts back up and running.
If that doesn't work I'll revert the update and changes introduced by this PR and the commits afterwards.
We need to improve the testing scripts to be able to run more sophisticated tests so we don't break the Jenkins job each time we need to run a tiny update.
This is strange. sendExpression(loadModel(IDEAS,{"master"}), True) looks perfectly fine.
I tried the following with OMPython 4.0.0 and it worked fine.
[...]
I used version 3.0.0 since that's what I got from package manager. With master I get,
[...]
Perhaps some issue with quoting of string? @syntron any idea?
Yes - I just tested it in OpenModelica and 3.0.0 imports well and master / 4.0.0-master fail. Thus, it is not a problem of OMPython but of the library ...
I'm thinking about / working on an update of the error handling to show all messages of OMC on error
Activity
AnHeuermann commentedon Nov 3, 2025
@adpro How are Python dependencies like OMPython managed for our nightly tests?
If #244 get's merged we need to update them.
AnHeuermann commentedon Nov 13, 2025
Now I need to update our servers:
Next week I need to make sure that all LibraryTest jobs are running again and not reporting strange errors.
AnHeuermann commentedon Nov 13, 2025
Jenkins breaks: https://test.openmodelica.org/jenkins/blue/organizations/jenkins/LibraryTesting%2FLibraryTest/detail/LibraryTest/10187/pipeline/
adeas31 commentedon Nov 14, 2025
This is strange.
sendExpression(loadModel(IDEAS,{"master"}), True)looks perfectly fine.I tried the following with OMPython 4.0.0 and it worked fine.
I used version
3.0.0since that's what I got from package manager. WithmasterI get,Perhaps some issue with quoting of string?
@syntron any idea?
AnHeuermann commentedon Nov 14, 2025
I'm trying to reproduce the error locally by running the full script:
I think I have a fix, but at the same time the scripts print so many errors it's very hard to tell what's going on.
I'll give it a final try to get the scripts back up and running.
If that doesn't work I'll revert the update and changes introduced by this PR and the commits afterwards.
We need to improve the testing scripts to be able to run more sophisticated tests so we don't break the Jenkins job each time we need to run a tiny update.
AnHeuermann commentedon Nov 14, 2025
The library tests seem to be huffing and puffing along: https://test.openmodelica.org/jenkins/job/LibraryTesting/job/LibraryTest/
syntron commentedon Nov 14, 2025
Yes - I just tested it in OpenModelica and 3.0.0 imports well and master / 4.0.0-master fail. Thus, it is not a problem of OMPython but of the library ...
I'm thinking about / working on an update of the error handling to show all messages of OMC on error