arokem / python-matlab-bridge

A simple Python => MATLAB(R) interface and a matlab_magic for ipython
BSD 2-Clause "Simplified" License
335 stars 96 forks source link

ZMQError when trying to start matlab #197

Open mmagnuski opened 9 years ago

mmagnuski commented 9 years ago

Some time ago pymatbridge worked on my windows 8, python 2.7 machine. However now I am using the latest pip-installable version and getting this error:

---------------------------------------------------------------------------
ZMQError                                  Traceback (most recent call last)
<ipython-input-2-54e8c7114900> in <module>()
      1 # start matlab session
      2 mlab = Matlab()
----> 3 mlab.start()

D:\Python\Anaconda\lib\site-packages\pymatbridge\pymatbridge.pyc in start(self)
    205             port = self.socket.bind_to_random_port(self.socket_addr)
    206             self.socket_addr = self.socket_addr + ":%s"%port
--> 207             self.socket.unbind(self.socket_addr)
    208 
    209         # Start the MATLAB server in a new process

zmq/backend/cython/socket.pyx in zmq.backend.cython.socket.Socket.unbind (zmq\backend\cython\socket.c:4525)()

ZMQError: No such file or directory

My zmq knowledge is practically z(ero) so I don't know how to proceed.

arokem commented 9 years ago

Must be related to the PR: https://github.com/arokem/python-matlab-bridge/pull/182/files.

Would it be too much to ask you to put a print statement in there to tell us what the value of self.socket_addr is?

You should be able to open D:\Python\Anaconda\lib\site- packages\pymatbridge\pymatbridge.py in a text editor and add a line like:

print(self.socket_addr)

right before the error on line 207

On Sun, Jun 7, 2015 at 5:03 AM, Mikolaj Magnuski notifications@github.com wrote:

Some time ago pymatbridge worked on my windows 8, python 2.7 machine. However now I am using the latest pip-installable version and getting this error:


ZMQError Traceback (most recent call last)

in () 1 # start matlab session 2 mlab = Matlab() ----> 3 mlab.start() D:\Python\Anaconda\lib\site-packages\pymatbridge\pymatbridge.pyc in start(self) 205 port = self.socket.bind_to_random_port(self.socket_addr) 206 self.socket_addr = self.socket_addr + ":%s"%port --> 207 self.socket.unbind(self.socket_addr) 208 209 # Start the MATLAB server in a new process zmq/backend/cython/socket.pyx in zmq.backend.cython.socket.Socket.unbind (zmq\backend\cython\socket.c:4525)() ZMQError: No such file or directory My zmq knowledge is practically z(ero) so I don't know how to proceed. — Reply to this email directly or view it on GitHub https://github.com/arokem/python-matlab-bridge/issues/197.
mmagnuski commented 9 years ago

No problem, the value is tcp://127.0.0.1:58619 (in another run the value is tcp://127.0.0.1:58658 etc.).

maurokenny commented 9 years ago

I am having the same problem using Windows 7 64 bits, python 2.7.9 64 bits and Canopy 1.5.5.

arokem commented 9 years ago

Sorry for the long while it's taken me to address this. I am no longer using Matlab at all, and other things have higher priority ATM. Does something like #205 work for you?