I'm using mlab on my macOS Sierra,and the version of matlab is R2015b.
When I type in
from mlab.releases import R2015b as matlab
from matlab import matlabroot
print matlabroot()
/Applications/MATLAB_R2015b.app
matlab.plot([2,3,4,5,8,1],'-o')
It failed to work normally and it said:
Traceback (most recent call last):
File "", line 1, in
File "/Users/xudan/tensorflow/lib/python2.7/site-packages/mlab/mlabwrap.py", line 607, in mlab_command
return self._do(name, *args, **update({'nout':nout}, kwargs))
File "/Users/xudan/tensorflow/lib/python2.7/site-packages/mlab/mlabwrap.py", line 547, in _do
res = self._get_values(resSL)
File "/Users/xudan/tensorflow/lib/python2.7/site-packages/mlab/mlabwrap.py", line 483, in _get_values
res.append(self._get(varname))
File "/Users/xudan/tensorflow/lib/python2.7/site-packages/mlab/mlabwrap.py", line 568, in _get
vartype = self._var_type(varname)
File "/Users/xudan/tensorflow/lib/python2.7/site-packages/mlab/mlabwrap.py", line 436, in var_type
res_type = mlabraw.get(self.session, "TMP_CLS")
File "/Users/xudan/tensorflow/lib/python2.7/site-packages/mlab/mlabraw.py", line 73, in get
return matlab.get(var_name)
File "/Users/xudan/tensorflow/lib/python2.7/site-packages/mlab/matlabpipe.py", line 250, in get
self._read_until('start_binary\n', on_new_output=on_new_output)
File "/Users/xudan/tensorflow/lib/python2.7/site-packages/mlab/matlabpipe.py", line 294, in _read_until
raise MatlabConnectionError('timeout')
mlab.matlabpipe.MatlabConnectionError: timeout
What can I do to fix this problem?
Go through the code lines mentioned in the traceback, especially self._read_untl('start_binary'
Repeat the critical steps yourself by hand from the mac terminal and see if you can get it working manually.
In short, eliminate one-by-one possible sources of error.