IPython内核开发:kernel_info_reply对代码突出显示无效

时间:2015-05-17 19:29:25

标签: ipython ipython-notebook

当我为Spark(https://github.com/tribbloid/ISpark

测试自定义IPython内核时

代码突出显示和注释行快捷方式不起作用,尽管块元数据和websocket通信都显示收到了kernel_info_reply:

元数据:

{ 
  "kernelspec": { 
    "name": "spark", 
    "display_name": "ISpark", 
    "language": "Scala" 
  }, 
  "language_info": { 
    "mimetype": "text/x-scala", 
    "file_extension": "scala", 
    "version": "2.10.4", 
    "name": "Scala", 
    "codemirror_mode": "Scala" 
  } 
} 

收到websocket消息:

{"parent_header": {"username": "username", "session": "1E1A0C0BD7B848D5874427164D5A6407", "version": "5.0", "msg_id": "393B1AED65C34EDA9DB6B0CACAB1DA03", "msg_type": "kernel_info_request"}, "msg_type": "kernel_info_reply", "msg_id": "44558c0a-5a49-469a-b55a-9032fa10ee5b", "content": {"implementation": "iSpark", "protocol_version": "5.0", "language_info": {"mimetype": "text/x-scala", "file_extension": "scala", "version": "2.10.4", "name": "Scala", "codemirror_mode": "Scala"}, "implementation_version": "0.2.0", "banner": "welcome to Spark version 1.3.1"}, "header": {"username": "username", "session": "1E1A0C0BD7B848D5874427164D5A6407", "version": "5.0", "msg_id": "44558c0a-5a49-469a-b55a-9032fa10ee5b", "msg_type": "kernel_info_reply"}, "channel": "shell", "buffers": [], "metadata": {}} 

我还注意到一个曾经无害的异常,内核启动时会记录一条警告:

[W 15:07:03.310 NotebookApp]等待来自9ce0a466-2bbb-48c6-99a1-5211a207f81a的kernel_info回复的超时

它可能与https://github.com/ipython/ipython/pull/6793有关,但根据问题跟踪器,只要元数据正确,这样的问题就不会存在。

此错误的可能原因是什么以及如何解决?

0 个答案:

没有答案