Skip to content

"Error writing to output stream" on alternating calls of run_code() #180

@neuromusic

Description

@neuromusic

my initial discovery of this issue is outlined at #171
I suspect that this is the same problem as Calysto/matlab_kernel#8

Basically, I'm running pymatbridge from an iPython notebook server. The first Matlab() instance (or the first matlab_kernel that is created) returns "Error writing to output stream" on every other call

So the following code...

from pymatbridge import Matlab
mlab = Matlab()
mlab.start()
print mlab.run_code('a = [1,2,3,4]')
print mlab.run_code('a = [1,2,3,4]')
print mlab.run_code('a = [1,2,3,4]')
print mlab.run_code('a = [1,2,3,4]')

returns

{u'content': {u'datadir': u'/tmp/MatlabData/', u'code': u'a = [1,2,3,4]', u'figures': [], u'stdout': u'\na =\n\n     1     2     3     4\n\n'}, u'success': u'true'}
{u'content': {u'code': u'a = [1,2,3,4]', u'stdout': u'Error writing to output stream.\n\n'}, u'success': u'false'}
{u'content': {u'datadir': u'/tmp/MatlabData/', u'code': u'a = [1,2,3,4]', u'figures': [], u'stdout': u'\na =\n\n     1     2     3     4\n\n'}, u'success': u'true'}
{u'content': {u'code': u'a = [1,2,3,4]', u'stdout': u'Error writing to output stream.\n\n'}, u'success': u'false'}

Bizarro.

Also, the figures it returns are not formatted the same as subsequent instances. The are smaller and more pixelated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions