Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3392 closed defect (fixed)

OMCSession() function can not connect to OMC server

Reported by: Dietmar Winkler Owned by: Martin Sjölund
Priority: high Milestone: 1.9.4
Component: OMPython Version: trunk
Keywords: Cc:

Description

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)

comment:1 by Dietmar Winkler, 9 years ago

Component: OMOptimOMPython
Owner: changed from Hubert Thieriot to Alachew Mengist

comment:2 by Martin Sjölund, 9 years ago

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.

comment:3 by Martin Sjölund, 9 years ago

Owner: changed from Alachew Mengist to Martin Sjölund
Status: newaccepted

comment:4 by Martin Sjölund, 9 years ago

Resolution: fixed
Status: acceptedclosed

comment:5 by Dietmar Winkler, 9 years ago

Thanks. It works now as expected.

comment:6 by Dietmar Winkler, 9 years ago

Milestone: Future1.9.4

comment:7 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.