OMCSession() function can not connect to OMC server
Running the following will give an error:
>>> from OMPython import OMCSession
>>> OMCSession()
2015-07-30 11:29:44,989 - OMCSession - ERROR - OMC Server is down. Please start it!
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/OMPython/__init__.py", line 198, in __init__
self._connect_to_omc()
File "/usr/local/lib/python2.7/dist-packages/OMPython/__init__.py", line 143, in _connect_to_omc
raise Exception
Exception
It was tried setting OPENMODELICAHOME=/usr/bin/omc
but that did not help either. So I guess some path variable is missing.
This seems to be a regression bug as OMCSession()
used to work in the expected way earlier this year (used as part of the icon generator script of om)
Change History
(8)
Component: |
OMOptim → OMPython
|
Owner: |
changed from Hubert Thieriot to Alachew Mengist
|
Owner: |
changed from Alachew Mengist to Martin Sjölund
|
Status: |
new → accepted
|
Resolution: |
→ fixed
|
Status: |
accepted → closed
|
Milestone: |
Future → 1.9.4
|
Milestone: |
1.9.4 → 1.9.4-1.9.x
|
Milestone: |
1.9.4-1.9.x → 1.9.4
|
It seems the OMConfig.py was not included in the package. OMPython 2.0.2 will now look in the PATH at run-time instead of during pip sdist.