Comments (6)
This is a difficult error to debug; the kernel extension is complaining that the Scala Listener has no comms; this is usually because the listener wasn't able to find a Spark Instance.
One solution might be to restart your kernel and refresh the page when you encounter this. I've found that sometimes installing the extension on a kernel that was previously running can result in some wonky errors that are simply fixed by a simply stop and start of the kernel and a refresh of the page.
from jupyterlab-sparkmonitor.
I'm also having this problem. @samj1912 Figure anything out?
from jupyterlab-sparkmonitor.
I note it happens even when the extension is loaded directly from the notebook (in lieu of kernel initialization):
from jupyterlab-sparkmonitor.
Extension thinks its loaded:
from jupyterlab-sparkmonitor.
So my current read is that register_comm
is begin called, but the self.target_func
callback isn't being called before comm
is being dereferenced in send
.
jupyterlab-sparkmonitor/sparkmonitor/kernelextension.py
Lines 65 to 69 in 25fc133
from jupyterlab-sparkmonitor.
It can be worked around by checking if the frontend has already connected or not when using the comm object. It might be interesting to queue messages maybe ?
I suspect #18 is an other manifestation of this thread crash (but from the Spark listener side).
diff --git a/sparkmonitor/kernelextension.py b/sparkmonitor/kernelextension.py
index 6a94f5e..fbf3c04 100644
--- a/sparkmonitor/kernelextension.py
+++ b/sparkmonitor/kernelextension.py
@@ -41,6 +41,7 @@ class ScalaMonitor:
ipython is the instance of ZMQInteractiveShell
"""
self.ipython = ipython
+ self.comm = None
def start(self):
"""Creates the socket thread and returns assigned port"""
@@ -53,7 +54,8 @@ class ScalaMonitor:
def send(self, msg):
"""Send a message to the frontend"""
- self.comm.send(msg)
+ if self.comm:
+ self.comm.send(msg)
def handle_comm_message(self, msg):
"""Handle message received from frontend
from jupyterlab-sparkmonitor.
Related Issues (16)
- Integration with Spark Magic. HOT 2
- fails when trying to be installed in jupyterlab 2.x HOT 2
- Monitoring appears under wrong cell HOT 4
- Exception when registering SparkListener HOT 2
- jupyterlab_sparkmonitor is not a valid npm package errore HOT 2
- Exception sending socket message while running jobs HOT 1
- Error creating PySpark Job HOT 1
- pyspark 3.0.0 support? HOT 11
- Can this extension be integrated with user kernels in JupyterHub ? HOT 1
- Release new version HOT 2
- 'conf' is not defined for version 4.1.0 HOT 2
- JupyterHub on k8s Integration
- Monitor does not with Spark-3.2.0 HOT 5
- Not working with Jupyter docker stacks HOT 1
- add support for Jupyter 3.3.2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jupyterlab-sparkmonitor.