Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICSHARP kernel does not work with Jupyter 4.0 #70

Closed
den-run-ai opened this issue Sep 12, 2015 · 7 comments
Closed

ICSHARP kernel does not work with Jupyter 4.0 #70

den-run-ai opened this issue Sep 12, 2015 · 7 comments
Milestone

Comments

@den-run-ai
Copy link

zabirauf/icsharp#5

zabirauf/icsharp#4

@Carreau
Copy link
Member

Carreau commented Sep 12, 2015

And from list was working on 3.0, seem to be a change in the adapter, where if "version" is in header, but it empty string, is not assumed to be "4.0"

@minrk
Copy link
Member

minrk commented Sep 12, 2015

That's very strange. A message with an empty version string has never been valid, so if it is the case, the messages valid in any version of the protocol, and adaptation should either fail outright or be undefined. What else is there to do?

@Carreau
Copy link
Member

Carreau commented Sep 12, 2015

That's very strange. A message with an empty version string has never been valid, so if it is the case, the messages valid in any version of the protocol, and adaptation should either fail outright or be undefined. What else is there to do?

Figure out what the regression is between 3.0 and 4.0, as far as I understood from the above issues and on ML it works on 3.0 so there is no reason not to work on 4.0.

@minrk
Copy link
Member

minrk commented Sep 12, 2015

@Carreau I don't think there's any change between IPython 3 and Jupyter 4. I don't see any reference to this working in IPython 3, only IPython 2, prior to the msgspec change. Since IC# puts an invalid version field in the header, adaptation fails to detect the correct version. Fixing this header (zabirauf/icsharp#7) ought to allow adaptation to start working. I don't think there are any changes to make, here.

@Carreau
Copy link
Member

Carreau commented Sep 12, 2015

I might have just misunderstood the ML conversation, I was under the impression that it was working on 3.0

@den-run-ai
Copy link
Author

@minrk @Carreau with the latest changes the kernel is still not working on ipython 3.0/4.0, but works on ipython 2.0. Bunch of null arguments in zmq connection messages:

$ conda install jupyter
Fetching package metadata: ....
Solving package specifications: .
Package plan for installation in environment F:\Python\Python27:

The following NEW packages will be INSTALLED:

    jupyter: 1.0.0-py27_0

The following packages will be UPDATED:

    ipython: 3.0.0-py27_1 --> 4.0.0-py27_0

Proceed ([y]/n)? y

Unlinking packages ...
[      COMPLETE      ]|##################################################| 100%
Linking packages ...
[      COMPLETE      ]|##################################################| 100%

dta@DESKTOP-K8M8TNI C:\Users\dta
$ ipython notebook --config="C:\Users\dta\.ipython\profile_icsharp\ipython_notebook_config.py"
[I 00:34:41.674 NotebookApp] Serving notebooks from local directory: C:\Users\dta
[I 00:34:41.674 NotebookApp] 0 active kernels
[I 00:34:41.676 NotebookApp] The IPython Notebook is running at: http://localhost:8888/
[I 00:34:41.677 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
F:\Python\Python27\lib\site-packages\jupyter_client\manager.py:97: UserWarning: Setting kernel_cmd is deprecated, use kernel_spec to start different kernels.
  warnings.warn("Setting kernel_cmd is deprecated, use kernel_spec to "
[I 00:35:07.348 NotebookApp] Kernel started: 25a94713-4616-4afb-9d06-8e1962d80024
2015/09/13 00:35:07:467 [DEBUG] Hello2
2015/09/13 00:35:07:494 [DEBUG] C:\Users\dta\AppData\Roaming\jupyter\runtime\kernel-25a94713-4616-4afb-9d06-8e1962d80024.json
2015/09/13 00:35:07:507 [INFO]  Opening file C:\Users\dta\AppData\Roaming\jupyter\runtime\kernel-25a94713-4616-4afb-9d06-8e1962d80024.json
2015/09/13 00:35:07:508 [DEBUG] {
  "stdin_port": 62806,
  "ip": "x.x.x.1",
  "control_port": 62807,
  "hb_port": 62808,
  "signature_scheme": "hmac-sha256",
  "key": "",
  "shell_port": 62804,
  "transport": "tcp",
  "iopub_port": 62805
}
2015/09/13 00:35:08:554 [INFO]  Shell Started
2015/09/13 00:35:08:568 [INFO]  Binded the Shell server to address tcp://x.x.x.1:62804
2015/09/13 00:35:08:570 [INFO]  Binded the  IOPub to address tcp://x.x.x.1:62805
2015/09/13 00:35:08:863 [INFO]   ???^
2015/09/13 00:35:08:597 [INFO]
2015/09/13 00:35:08:597 [INFO]  {"username":"username","msg_type":"kernel_info_request","msg_id":"aab60fcb-0a20-40e0-aa30-8dccd2a1206f","version":"5.0","session":"A37AA3126C0C4625B73DA7361786CFCE","date":"2015-09-13T00:35:07.420000"}
2015/09/13 00:35:08:611 [INFO]  {}
2015/09/13 00:35:08:612 [INFO]  {}
2015/09/13 00:35:08:625 [INFO]  {}
2015/09/13 00:35:08:657 [INFO]  {"uuid":"\u0000???^","hmac":"","header":{"msg_id":"aab60fcb-0a20-40e0-aa30-8dccd2a1206f","username":"username","session":"A37AA3126C0C4625B73DA7361786CFCE","msg_type":"kernel_info_request","version":"5.0"},"parent_header":{"msg_id":null,"username":null,"session":null,"msg_type":null,"version":null},"metadata":{},"content":"{}"}
2015/09/13 00:35:08:659 [INFO]  Sending message to handler kernel_info_request
2015/09/13 00:35:08:664 [INFO]  Sending kernel_info_reply
2015/09/13 00:35:08:667 [INFO]  Message handling complete
[W 00:35:17.430 NotebookApp] Timeout waiting for kernel_info reply from 25a94713-4616-4afb-9d06-8e1962d80024
2015/09/13 00:35:17:446 [INFO]  A37AA3126C0C4625B73DA7361786CFCE
2015/09/13 00:35:17:446 [INFO]
2015/09/13 00:35:17:447 [INFO]  {"username":"username","version":"5.0","msg_id":"889D6D6B2B954EA5A792C656683A5E9D","msg_type":"kernel_info_request","session":"A37AA3126C0C4625B73DA7361786CFCE"}
2015/09/13 00:35:17:449 [INFO]  {}
2015/09/13 00:35:17:450 [INFO]  {}
2015/09/13 00:35:17:451 [INFO]  {}
2015/09/13 00:35:17:452 [INFO]  {"uuid":"A37AA3126C0C4625B73DA7361786CFCE","hmac":"","header":{"msg_id":"889D6D6B2B954EA5A792C656683A5E9D","username":"username","session":"A37AA3126C0C4625B73DA7361786CFCE","msg_type":"kernel_info_request","version":"5.0"},"parent_header":{"msg_id":null,"username":null,"session":null,"msg_type":null,"version":null},"metadata":{},"content":"{}"}
2015/09/13 00:35:17:455 [INFO]  Sending message to handler kernel_info_request
2015/09/13 00:35:17:456 [INFO]  Sending kernel_info_reply
2015/09/13 00:35:17:458 [INFO]  Message handling complete
[2015/09/13 00:35:17:461 [INFO]  A37AA3126C0C4625B73DA7361786CFCE
C 00:35:17.459 NotebookApp] Malformed message: ['<IDS|MSG>', '', '{"msg_id":"1a0f75e1-5a50-46df-9120-81d45fb209ce","username":"icsharp_kernel","session":"A37AA3126C0C4625B73DA7361786CFCE","msg_type":"kernel_info_reply","version":null}', '{"msg_id":"889D6D6B2B954EA5A792C656683A5E9D","username":"username","session":"A37AA3126C0C4625B73DA7361786CFCE","msg_type":"kernel_info_request","version":"5.0"}', '{}', '{"protocol_version":"4.1","implementation":"iCsharp","implementation_version":null,"language":"C#","language_version":"0.0.1","banner":null,"ipython_version":"2.0.0dev"}']
    Traceback (most recent call last):
      File "F:\Python\Python27\lib\site-packages\notebook\base\zmqhandlers.py", line 184, in _on_zmq_reply
        msg = self._reserialize_reply(msg_list, channel=channel)
      File "F:\Python\Python27\lib\site-packages\notebook\base\zmqhandlers.py", line 165, in _reserialize_reply
        msg = self.session.deserialize(msg_list)
      File "F:\Python\Python27\lib\site-packages\jupyter_client\session.py", line 868, in deserialize
        return adapt(message)
      File "F:\Python\Python27\lib\site-packages\jupyter_client\adapter.py", line 386, in adapt
2015/09/13 00:35:17:462 [INFO]
        from_version = int(header['version'].split('.')[0])
    AttributeError: 'NoneType' object has no attribute 'split'
2015/09/13 00:35:17:468 [INFO]  {"username":"username","version":"5.0","msg_id":"BBC4DED53A164BA28C07FBCB48DAB34D","msg_type":"comm_open","session":"A37AA3126C0C4625B73DA7361786CFCE"}
2015/09/13 00:35:17:470 [INFO]  {}
2015/09/13 00:35:17:471 [INFO]  {}
2015/09/13 00:35:17:471 [INFO]  {"target_name":"ipython.widget","data":{"widget_class":"ipywidgets.CommInfo"},"comm_id":"FA01C9F20D7A4EAB809A0B90F7562556"}
2015/09/13 00:35:17:472 [INFO]  {"uuid":"A37AA3126C0C4625B73DA7361786CFCE","hmac":"","header":{"msg_id":"BBC4DED53A164BA28C07FBCB48DAB34D","username":"username","session":"A37AA3126C0C4625B73DA7361786CFCE","msg_type":"comm_open","version":"5.0"},"parent_header":{"msg_id":null,"username":null,"session":null,"msg_type":null,"version":null},"metadata":{},"content":"{\"target_name\":\"ipython.widget\",\"data\":{\"widget_class\":\"ipywidgets.CommInfo\"},\"comm_id\":\"FA01C9F20D7A4EAB809A0B90F7562556\"}"}
2015/09/13 00:35:17:476 [ERROR] No message handler found for message type comm_open

@Carreau
Copy link
Member

Carreau commented Sep 13, 2015

Closed by zabirauf/icsharp#10 apparently !

Thanks !

@Carreau Carreau closed this as completed Sep 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants