mantidproject / mslice

Source code for Mantid MSlice
http://mantidproject.github.io/mslice
1 stars 2 forks source link

MSlice hangs or crashes when using the jupyter console #910

Closed MialLewis closed 1 year ago

MialLewis commented 1 year ago

Describe the bug

This occurs on my windows machine (all type of builds), and has been replicated on another windows machine with workbench installed via the installer.

When running scripts the mslice jupyter console takes a long time, hangs, and outputs IOStream.flush timed out

To Reproduce

Run the following script in the mslice Jupyter console (changing the filepath to suit):

import mslice.cli as mc
ws = mc.Load('C:\\MAR21335_Ei60meV.nxs')
wsq = mc.Cut(ws, '|Q|', 'DeltaE, -1, 1')
mc.PlotCut(wsq)
ws2d = mc.Slice(ws, '|Q|, 0, 10, 0.01', 'DeltaE, -5, 55, 0.5')
mc.PlotSlice(ws2d)

Expected behavior The console should work smoothly

Screenshots image

Stacktrace

Uncaught exception in ZMQStream callback
Traceback (most recent call last):
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\zmq\eventloop\zmqstream.py", line 584, in _run_callback
    f = callback(*args, **kwargs)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\ipykernel\iostream.py", line 118, in _handle_event
    event_f()
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\ipykernel\iostream.py", line 212, in <lambda>
    self.schedule(lambda : self._really_send(*args, **kwargs))
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\ipykernel\iostream.py", line 220, in _really_send
    self.socket.send_multipart(msg, *args, **kwargs)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\ipykernel\inprocess\socket.py", line 58, in send_multipart
    self.message_sent += 1
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\traitlets\traitlets.py", line 732, in __set__
    self.set(obj, value)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\traitlets\traitlets.py", line 721, in set
    obj._notify_trait(self.name, old_value, new_value)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\traitlets\traitlets.py", line 1505, in _notify_trait
    self.notify_change(
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\traitlets\traitlets.py", line 1517, in notify_change
    return self._notify_observers(change)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\traitlets\traitlets.py", line 1564, in _notify_observers
    c(event)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\ipykernel\inprocess\ipkernel.py", line 130, in _io_dispatch
    ident, msg = self.session.recv(self.iopub_socket, copy=False)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\jupyter_client\session.py", line 935, in recv
    msg_list = socket.recv_multipart(mode, copy=copy)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\ipykernel\iostream.py", line 244, in __getattr__
    warnings.warn("Accessing zmq Socket attribute %s on BackgroundSocket" % attr,
DeprecationWarning: Accessing zmq Socket attribute recv_multipart on BackgroundSocket
Uncaught exception in zmqstream callback
Traceback (most recent call last):
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\zmq\eventloop\zmqstream.py", line 634, in _handle_events
    self._handle_recv()
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\zmq\eventloop\zmqstream.py", line 663, in _handle_recv
    self._run_callback(callback, msg)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\zmq\eventloop\zmqstream.py", line 584, in _run_callback
    f = callback(*args, **kwargs)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\ipykernel\iostream.py", line 118, in _handle_event
    event_f()
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\ipykernel\iostream.py", line 212, in <lambda>
    self.schedule(lambda : self._really_send(*args, **kwargs))
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\ipykernel\iostream.py", line 220, in _really_send
    self.socket.send_multipart(msg, *args, **kwargs)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\ipykernel\inprocess\socket.py", line 58, in send_multipart
    self.message_sent += 1
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\traitlets\traitlets.py", line 732, in __set__
    self.set(obj, value)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\traitlets\traitlets.py", line 721, in set
    obj._notify_trait(self.name, old_value, new_value)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\traitlets\traitlets.py", line 1505, in _notify_trait
    self.notify_change(
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\traitlets\traitlets.py", line 1517, in notify_change
    return self._notify_observers(change)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\traitlets\traitlets.py", line 1564, in _notify_observers
    c(event)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\ipykernel\inprocess\ipkernel.py", line 130, in _io_dispatch
    ident, msg = self.session.recv(self.iopub_socket, copy=False)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\jupyter_client\session.py", line 935, in recv
    msg_list = socket.recv_multipart(mode, copy=copy)
  File "C:\Users\wym92549\AppData\Local\mambaforge\envs\mantidnightly\lib\site-packages\ipykernel\iostream.py", line 244, in __getattr__
    warnings.warn("Accessing zmq Socket attribute %s on BackgroundSocket" % attr,
DeprecationWarning: Accessing zmq Socket attribute recv_multipart on BackgroundSocket
SilkeSchomann commented 1 year ago

@MialLewis Is this not fixed now through Mantid?

MialLewis commented 1 year ago

Yep, this is fixed now.