Skip to content

error messages from json/decoder.py ? #22

Open

Description

@chi-hung

After excuting:

jupyter console --kernel java

I've got the following error messages. Something wrong?

Traceback (most recent call last):
File "/usr/local/bin/jupyter-console", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/usr/local/lib/python2.7/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argue
File "", line 2, in initialize
File "/usr/local/lib/python2.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, _args, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/jupyter_console/app.py", line 137, in initialize
self.init_shell()
File "/usr/local/lib/python2.7/site-packages/jupyter_console/app.py", line 105, in init_shell
JupyterConsoleApp.initialize(self)
File "/usr/local/lib/python2.7/site-packages/jupyter_client/consoleapp.py", line 334, in initialize
self.init_kernel_manager()
File "/usr/local/lib/python2.7/site-packages/jupyter_client/consoleapp.py", line 288, in init_kernel_manager
self.kernel_manager.start_kernel(**kwargs)
File "/usr/local/lib/python2.7/site-packages/jupyter_client/manager.py", line 230, in start_kernel
kernel_cmd = self.format_kernel_cmd(extra_arguments=extra_arguments)
File "/usr/local/lib/python2.7/site-packages/jupyter_client/manager.py", line 170, in format_kernel_cmd
cmd = self.kernel_spec.argv + extra_arguments
File "/usr/local/lib/python2.7/site-packages/jupyter_client/manager.py", line 82, in kernel_spec
self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
File "/usr/local/lib/python2.7/site-packages/jupyter_client/kernelspec.py", line 177, in get_kernel_spec
return self._get_kernel_spec_by_name(kernel_name, resource_dir)
File "/usr/local/lib/python2.7/site-packages/jupyter_client/kernelspec.py", line 164, in _get_kernel_spec_by_name
return self.kernel_spec_class.from_resource_dir(resource_dir)
File "/usr/local/lib/python2.7/site-packages/jupyter_client/kernelspec.py", line 38, in from_resource_dir
kernel_dict = json.load(f)
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 291, in load
**kw)
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 380, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting ',' delimiter: line 6 column 2 (char 137))

Activity

  1. Bachmann1234 commented on Sep 30, 2016

    @Bachmann1234
    Owner

    Can you post your kernal config json? That error suggests there is an error in parsing that file. Looks like a comma missing.

  2. chi-hung commented on Oct 9, 2016

    @chi-hung
    Author

    Here it is. Sorry for the late reply. By the way, in order to see if jshell works, I switched to java9 and typed java -jar kulla.jar in terminal. I find out that the jshell can start and I can do some basic stuffs interactively without problem. So, could it be something wrong between Python and the java kernel?

      1 { 
      2  "argv": ["python3", "/Users/chweng/javakernel",
      3           "-f", "{connection_file}"],
      4  "display_name": "Java 9",
      5  "language": "java"
      6  "env" : {
      7      "JAVA_9_HOME": "/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home",
      8      "KULLA_HOME": "/Users/chweng/kulla/kulla.jar"
      9      }   
     10 } 
    
  3. chi-hung commented on Oct 9, 2016

    @chi-hung
    Author

    uh..., you are right. There's a comma missing at line 5. Now, the following is my new kernel config. (I wasn't sure if it is necessary to add the -f {connection file}?)

      1 {
      2  "argv": ["python3", "/Users/chweng/javakernel"],
      3  "display_name": "Java 9",
      4  "language": "java",
      5  "env" : {
      6      "JAVA_9_HOME": "/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home",
      7      "KULLA_HOME": "/Users/chweng/kulla/kulla.jar"
      8      }
      9 }
    

    Anyway, after typing

    jupyter console --kernel java

    I still get some error messages:

    Traceback (most recent call last):
    File "/usr/local/lib/python3.5/site-packages/jupyter_console/ptshell.py", line 302, in init_kernel_info
    reply = self.client.get_shell_msg(timeout=1)
    File "/usr/local/lib/python3.5/site-packages/jupyter_client/client.py", line 77, in get_shell_msg
    return self.shell_channel.get_msg(_args, *_kwargs)
    File "/usr/local/lib/python3.5/site-packages/jupyter_client/blocking/channels.py", line 57, in get_msg
    raise Empty
    queue.Empty

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/usr/local/bin/jupyter-console", line 11, in
    sys.exit(main())
    File "/usr/local/lib/python3.5/site-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, *_kwargs)
    File "/usr/local/lib/python3.5/site-packages/traitlets/config/application.py", line 657, in launch_instance
    app.initialize(argue
    File "", line 2, in initialize
    File "/usr/local/lib/python3.5/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, *_kwargs)
    File "/usr/local/lib/python3.5/site-packages/jupyter_console/app.py", line 137, in initialize
    self.init_shell()
    File "/usr/local/lib/python3.5/site-packages/jupyter_console/app.py", line 110, in init_shell
    client=self.kernel_client,
    File "/usr/local/lib/python3.5/site-packages/traitlets/config/configurable.py", line 412, in instance
    inst = cls(_args, *_kwargs)
    File "/usr/local/lib/python3.5/site-packages/jupyter_console/ptshell.py", line 251, in init
    self.init_kernel_info()
    File "/usr/local/lib/python3.5/site-packages/jupyter_console/ptshell.py", line 305, in init_kernel_info
    raise RuntimeError("Kernel didn't respond to kernel_info_request")
    RuntimeError: Kernel didn't respond to kernel_info_request)

    It appeared that the kernel died somehow?

  4. Bachmann1234 commented on Oct 11, 2016

    @Bachmann1234
    Owner

    Yeah, I think the kernel is broken. Not sure why. Im thinking something changes in ipython but I am not likely going to be able to look into this for a while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions