Open ruozhichen opened 7 years ago
@ruozhichen HI, have you solved this problem ? I face the same problem.
@handworker
Sorry,I still not find a solution. However, I use another way to call matlab from python. You can choose matlab engine for python.
install:
http://cn.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html
how to call matlab script:
http://cn.mathworks.com/help/matlab/matlab_external/call-user-script-and-function-from-python.html
Hope this could help you.
@ruozhichen Thanks!
I've run into this problem as well, and, in my case, it was because the function I was calling was running into an error, and therefore never returned. This caused the pipe to never find the ___MATLAB_PIPE_COMMAND_ENDED___
terminator it was waiting for, and thus, the timeout message.
I diagnosed the problem my adding print "output_tail: %s" % (output_tail)
just before this line so I could see exactly what was going on.
I'd suggest that the fix is to modify that _read_until
function to look for errors and to throw an exception if one is returned.
When I executed the following commands, trying to call matlab function, it failed and the error trace is given at the end. from mlab.releases import latest_release as matlab matlab.plot([1,2,3,4,5],-'o')
It happened in Ubuntu. And I tested mlab in Windows before, it succeeded. So I don't know why it doesn't work in Ubuntu, I try to solve it but found nothing, I will be appreciated If anyone has some suggestions. If you have solved it before or know this error, please tell me.