2
我想發送一些任意數據到Jupyter Notebook前端。通過Comm發送json數據到Jupyter Notebook前端
根據http://jupyter-client.readthedocs.org/en/latest/messaging.html#opening-a-comm,Comm協議是一種發送自定義消息類型的方式,而不需要像使用execute_request
msg_type那樣的黑客技術。
在Python端,我有
from ipykernel.comm import Comm
c=Comm()
#c.open()
#c.send(data={'foo':'bar'})
然而,在JavaScript端上我初始化通訊()得到一個錯誤:
Error: Class comm not found in registry at http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:12751:28 at Object.load_class (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:12736:16) at CommManager.comm_open (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:21802:37) at x.isFunction.i (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:89:5488) at Kernel._handle_iopub_message (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:23101:20) at Kernel._finish_ws_message (http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:22936:29) at http://localhost:8888/static/notebook/js/main.min.js?v=40e10638fcf65fc1c057bff31d165e9d:22926:44
這個錯誤是什麼意思?