Skip to content

Conversation

@AnHeuermann
Copy link
Member

Issue

Loading a broken library crashes the script:

Skipping IDEAS as we already have results for it: (1762983975, '3.0.0 (https://github.com/open-ideas/IDEAS/archive/a7be00b7e07943c0acda1b5799a8d32bea896d7b.zip)', 'IDEAS', 'master', 'OMCompiler v1.26.0-dev.473+g1d95b24818')
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
117.91user 33.54system 1:12.69elapsed 208%CPU (0avgtext+0avgdata 1608836maxresident)k
401840inputs+1794112outputs (79649major+6121527minor)pagefaults 0swaps
+ killall omc
omc: no process found

Changes

  • omc.sendExpression now throws OMCSessionException when failing to load.
  • Handle it with a try block.

  - omc.sendExpression now throws OMCSessionException
@AnHeuermann AnHeuermann self-assigned this Nov 13, 2025
@AnHeuermann AnHeuermann enabled auto-merge (squash) November 13, 2025 18:54
@AnHeuermann AnHeuermann merged commit 41a6ced into OpenModelica:master Nov 13, 2025
8 checks passed
@AnHeuermann AnHeuermann deleted the fix-library-test branch November 13, 2025 19:02
AnHeuermann added a commit to AnHeuermann/OpenModelicaLibraryTesting that referenced this pull request Nov 17, 2025
…lica#248

Revert update of OMPython

- Keep devcontainer
- Keep update to Markdown files

This reverts commit 342ed04.
AnHeuermann added a commit that referenced this pull request Nov 17, 2025
Revert update of OMPython

- Keep devcontainer
- Keep update to Markdown files

This reverts commit 342ed04.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant