Hi All,
I am using a Jupyter Notebook on Macbook Air, but constantly ruuning in to issues of notebook “stalling” after running a few cells. I am doing data analysis using Matplotlib, and it a simple code to plot the data. The same notebook (.ipynb) runs fine on the Windows but gets stuck when running on Macbook Air. Could you pleas ehelp me how to resolve this issue?
He is a list of errors I see in the Terminal.
“[E 14:30:55.952 NotebookApp] Uncaught exception in ZMQStream callback
Traceback (most recent call last):
File “/opt/homebrew/lib/python3.9/site-packages/zmq/eventloop/zmqstream.py”, line 584, in _run_callback
f = callback(*args, **kwargs)
File “/opt/homebrew/lib/python3.9/site-packages/zmq/eventloop/zmqstream.py”, line 308, in stream_callback
return callback(self, msg)
File “/opt/homebrew/lib/python3.9/site-packages/notebook/services/kernels/handlers.py”, line 572, in _on_zmq_reply
super()._on_zmq_reply(stream, msg)
File “/opt/homebrew/lib/python3.9/site-packages/notebook/base/zmqhandlers.py”, line 256, in _on_zmq_reply
self.write_message(msg, binary=isinstance(msg, bytes))
File “/opt/homebrew/lib/python3.9/site-packages/tornado/websocket.py”, line 334, in write_message
return self.ws_connection.write_message(message, binary=binary)
File “/opt/homebrew/lib/python3.9/site-packages/tornado/websocket.py”, line 1081, in write_message
fut = self._write_frame(True, opcode, message, flags=flags)
File “/opt/homebrew/lib/python3.9/site-packages/tornado/websocket.py”, line 1056, in _write_frame
return self.stream.write(frame)
File “/opt/homebrew/lib/python3.9/site-packages/tornado/iostream.py”, line 539, in write
self._handle_write()
File “/opt/homebrew/lib/python3.9/site-packages/tornado/iostream.py”, line 965, in _handle_write
self._write_buffer.advance(num_bytes)
File “/opt/homebrew/lib/python3.9/site-packages/tornado/iostream.py”, line 182, in advance
assert 0 < size <= self._size
AssertionError
[E 14:30:55.952 NotebookApp] Uncaught exception in zmqstream callback
Traceback (most recent call last):
File “/opt/homebrew/lib/python3.9/site-packages/zmq/eventloop/zmqstream.py”, line 634, in _handle_events
self._handle_recv()
File “/opt/homebrew/lib/python3.9/site-packages/zmq/eventloop/zmqstream.py”, line 663, in _handle_recv
self._run_callback(callback, msg)
File “/opt/homebrew/lib/python3.9/site-packages/zmq/eventloop/zmqstream.py”, line 584, in _run_callback
f = callback(*args, **kwargs)
File “/opt/homebrew/lib/python3.9/site-packages/zmq/eventloop/zmqstream.py”, line 308, in stream_callback
return callback(self, msg)
File “/opt/homebrew/lib/python3.9/site-packages/notebook/services/kernels/handlers.py”, line 572, in _on_zmq_reply
super()._on_zmq_reply(stream, msg)
File “/opt/homebrew/lib/python3.9/site-packages/notebook/base/zmqhandlers.py”, line 256, in _on_zmq_reply
self.write_message(msg, binary=isinstance(msg, bytes))
File “/opt/homebrew/lib/python3.9/site-packages/tornado/websocket.py”, line 334, in write_message
return self.ws_connection.write_message(message, binary=binary)
File “/opt/homebrew/lib/python3.9/site-packages/tornado/websocket.py”, line 1081, in write_message
fut = self._write_frame(True, opcode, message, flags=flags)
File “/opt/homebrew/lib/python3.9/site-packages/tornado/websocket.py”, line 1056, in _write_frame
return self.stream.write(frame)
File “/opt/homebrew/lib/python3.9/site-packages/tornado/iostream.py”, line 539, in write
self._handle_write()
File “/opt/homebrew/lib/python3.9/site-packages/tornado/iostream.py”, line 965, in _handle_write
self._write_buffer.advance(num_bytes)
File “/opt/homebrew/lib/python3.9/site-packages/tornado/iostream.py”, line 182, in advance
assert 0 < size <= self._size
AssertionError
[E 14:30:55.953 NotebookApp] Exception in callback functools.partial(<function ZMQStream._update_handler.. at 0x1047c9700>)
Traceback (most recent call last):
File “/opt/homebrew/lib/python3.9/site-packages/tornado/ioloop.py”, line 738, in _run_callback
ret = callback()
File “/opt/homebrew/lib/python3.9/site-packages/zmq/eventloop/zmqstream.py”, line 718, in
self.io_loop.add_callback(lambda: self._handle_events(self.socket, 0))
File “/opt/homebrew/lib/python3.9/site-packages/zmq/eventloop/zmqstream.py”, line 634, in _handle_events
self._handle_recv()
File “/opt/homebrew/lib/python3.9/site-packages/zmq/eventloop/zmqstream.py”, line 663, in _handle_recv
self._run_callback(callback, msg)
File “/opt/homebrew/lib/python3.9/site-packages/zmq/eventloop/zmqstream.py”, line 584, in _run_callback
f = callback(*args, **kwargs)
File “/opt/homebrew/lib/python3.9/site-packages/zmq/eventloop/zmqstream.py”, line 308, in stream_callback
return callback(self, msg)
File “/opt/homebrew/lib/python3.9/site-packages/notebook/services/kernels/handlers.py”, line 572, in _on_zmq_reply
super()._on_zmq_reply(stream, msg)
File “/opt/homebrew/lib/python3.9/site-packages/notebook/base/zmqhandlers.py”, line 256, in _on_zmq_reply
self.write_message(msg, binary=isinstance(msg, bytes))
File “/opt/homebrew/lib/python3.9/site-packages/tornado/websocket.py”, line 334, in write_message
return self.ws_connection.write_message(message, binary=binary)
File “/opt/homebrew/lib/python3.9/site-packages/tornado/websocket.py”, line 1081, in write_message
fut = self._write_frame(True, opcode, message, flags=flags)
File “/opt/homebrew/lib/python3.9/site-packages/tornado/websocket.py”, line 1056, in _write_frame
return self.stream.write(frame)
File “/opt/homebrew/lib/python3.9/site-packages/tornado/iostream.py”, line 539, in write
self._handle_write()
File “/opt/homebrew/lib/python3.9/site-packages/tornado/iostream.py”, line 965, in _handle_write
self._write_buffer.advance(num_bytes)
File “/opt/homebrew/lib/python3.9/site-packages/tornado/iostream.py”, line 182, in advance
assert 0 < size <= self._size
AssertionError”
I have tried updating/upgrading downgrading python/notebook and installed/reinstalled libraries etc., but none of that worked. Please let me know how can I get away with this?
Thanks,
Arslan