pace-neutrons / pace-python

Python module of the PACE inelastic neutron data analysis suite of programs.
GNU General Public License v3.0
3 stars 4 forks source link

Error on running cells in Spyder due to output redirection #21

Closed mducle closed 2 years ago

mducle commented 2 years ago

Issue

When running a "cell" in Spyder, the output redirection apparently doesn't work, giving an

Error writing to output stream.
: iostream error

How to reproduce

On IDAaaS, start pace_neutrons under Spyder with:

/mnt/nomachine/isis_direct_soft/pace_neutrons -s

Create a script with the following:

from pace_neutrons import Matlab
m = Matlab()

#%%

hpc_status = m.hpc()

The #%% is a cell delimiter. The hpc_status = m.hpc() is in the second cell (index 1). Now run the cell with: (in the console):

runcell(1, '/path/to/file.py')

(or press Ctrl+Enter when the hpc() line is selected).

The error should appear. If you instead run the full file with:

runfile('/path/to/file.py')

(or click the green play triangle button) then everything works ok.

System details (version, OS)

v0.2.0 on IDAaaS (SL7)