﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4493	OMCSessionZMQ cannot connect to server	marco.forgione1986@…	Alachew Mengist	"The script

=========================================
import OMPython
import scipy.io as sio
import matplotlib.pyplot as plt

omc_session = OMPython.OMCSessionZMQ()
=======================================

returns the error
===========================================================

  File ""<ipython-input-7-e274c1c643a8>"", line 1, in <module>
    runfile('/home/marco/Desktop/whirlpool_all/modelica/OMPython-master-new/ompython_test_2.py', wdir='/home/marco/Desktop/whirlpool_all/modelica/OMPython-master-new')

  File ""/home/marco/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py"", line 880, in runfile
    execfile(filename, namespace)

  File ""/home/marco/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py"", line 102, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File ""/home/marco/Desktop/whirlpool_all/modelica/OMPython-master-new/ompython_test_2.py"", line 17, in <module>
    omc_session = OMPython.OMCSessionZMQ()

  File ""/home/marco/Desktop/whirlpool_all/modelica/OMPython-master-new/OMPython/__init__.py"", line 500, in __init__
    self._connect_to_omc()

  File ""/home/marco/Desktop/whirlpool_all/modelica/OMPython-master-new/OMPython/__init__.py"", line 526, in _connect_to_omc
    raise Exception

Exception
======================================================================

using python3 on linu. I has to change the line 116 OMPython/__init__.py to:

self._random_string = uuid.uuid4().hex + 'aa'

Now it works correctly for me.


"	defect	closed	high		OMPython	v1.12.0	worksforme		
