Opened 5 years ago
Last modified 3 years ago
#6016 new defect
Unable to access Open Modelica from Scilab
Reported by: | anonymous | Owned by: | Alachew Mengist |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | OMPython | Version: | v1.16.0-dev |
Keywords: | Open Modelica in Scilab | Cc: |
Description
I am using 'OpenModelica v1.16.0-dev-371-geb234c072 (64-bit)', 'Python 2.7.18' and 'Scilab-5.5.2'. I want to access Open Modelica from Scilab and to do so I am using Python as a bridge. I am using PIMS toolbox of Scilab to connect with Python and from there using OMPython to work with OpenModelica.
But whenever I try to access an OMCSessionZMQ() from Scilab using Python. I get the following error ->
OMPython - ERROR - OMC Server is down. Please start it! Log-file says:
Created ZeroMQ Server.
Dumped server port in file: C:\Users\USER~1\AppData\Local\Temp\/openmodelica.port.69f1318e05e04a1eac6f7296ee05ebbb
OMC did not exit after being sent the quit() command; killing the process with pid=9980
!--error 999
Method invocation: An error occurred: Unable to invoke the method: OMCSessionZMQ
Python interpreter threw an exception:
Traceback:
File C:\Python27\lib\site-packages\OMPython_init.py, line 559, in init
File C:\Python27\lib\site-packages\OMPython_init_.py, line 582, in connect_to_omc
exceptions.Exception: OMC Server is down. Could not open file c:/users/user~1/appdata/local/temp/sci_tmp_8420/openmodelica.port.69f1318e05e04a1eac6f7296ee05ebbb_
Whereas if I try to do the same thing from the command line directly by running "cmd" command and starting a python session by executing the "python" command. Then it is working fine and giving the following result ->
OMPython - INFO - OMC Server is up and running at file:///c:/users/user~1/appdata/local/temp/openmodelica.port.4b6d2d21a95d499194d5bfb4fd58392a pid=2012
I tried executing the same thing by starting command line from Python in Scilab, but that also doesn't work out.
Please help. Kindly also let me know if there are other methods to connect Scilab with OpenModelica.
Change History (4)
comment:1 by , 5 years ago
Milestone: | Future → 1.17.0 |
---|
comment:2 by , 4 years ago
comment:3 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
Is the environment variable OPENMODELICAHOME set in your Python shell in Scilab? Is the omc.exe on the PATH environment variable?