swan-cern / sparkmonitor

An extension for Jupyter Lab & Jupyter Notebook to monitor Apache Spark (pyspark) from notebooks
https://pypi.org/project/sparkmonitor/
Apache License 2.0
46 stars 9 forks source link

ScalaMonitor' object has no attribute 'comm' #22

Open geosmart opened 2 years ago

geosmart commented 2 years ago

when click Restart the kernel, then re-run the whole notebook ,just throw this error.

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.6/dist-packages/sparkmonitor/kernelextension.py", line 126, in run
    self.onrecv(msg)
  File "/usr/local/lib/python3.6/dist-packages/sparkmonitor/kernelextension.py", line 145, in onrecv
    'msg': msg
  File "/usr/local/lib/python3.6/dist-packages/sparkmonitor/kernelextension.py", line 223, in sendToFrontEnd
    monitor.send(msg)
  File "/usr/local/lib/python3.6/dist-packages/sparkmonitor/kernelextension.py", line 57, in send
    self.comm.send(msg)
AttributeError: 'ScalaMonitor' object has no attribute 'comm'

spark.driver.extraClassPath=/usr/local/lib/python3.6/dist-packages/sparkmonitor/listener_2.12.jar
spark.extraListeners=sparkmonitor.listener.JupyterSparkMonitorListener
SparkContext

[Spark UI](http://localhost:4041/)

Versionv3.1.2Masterlocal[*]AppNamepyspark-demo

but if I manualy click the Restart the Kernel and rerun the cell spark context init , it's working

CarterFendley commented 7 months ago

See #7