google / swift-jupyter

Apache License 2.0
619 stars 90 forks source link

Error initing KernelCommunicator #130

Open sindhus-in opened 2 years ago

sindhus-in commented 2 years ago

I tried installing through conda, as well through system python3 in Macbook Air M1. In both cases I ended up with the following error after starting

jupyter-notebook --debug

  File "/Users/sindhus/Library/Python/3.8/lib/python/site-packages/ipykernel/kernelbase.py", line 353, in dispatch_shell
    await result
  File "/Users/sindhus/Library/Python/3.8/lib/python/site-packages/ipykernel/kernelbase.py", line 643, in execute_request
    reply_content = self.do_execute(
  File "/Users/sindhus/code/swift-jupyter/swift_kernel.py", line 982, in do_execute
    self._init_swift()
  File "/Users/sindhus/code/swift-jupyter/swift_kernel.py", line 216, in _init_swift
    self._init_kernel_communicator()
  File "/Users/sindhus/code/swift-jupyter/swift_kernel.py", line 295, in _init_kernel_communicator
    raise Exception('Error initing KernelCommunicator: %s' % result)
Exception: Error initing KernelCommunicator: SwiftError(result=<lldb.SBValue; proxy of <Swig Object of type 'lldb::SBValue *' at 0x112896fc0> >, description="error: couldn't start parsing - no stack frame\n")

Kernel did start running otherwise, it is syntax highlighting correctly as well. I am running without tensorflow:

/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/share/jupyter/kernels/swift/kernel.json

{
  "argv": [
    "/Library/Developer/CommandLineTools/usr/bin/python3",
    "/Users/sindhus/code/swift-jupyter/swift_kernel.py",
    "-f",
    "{connection_file}"
  ],
  "display_name": "Swift",
  "language": "swift",
  "env": {
    "PYTHONPATH": "/Library/Developer/Toolchains/swift-5.5.1-RELEASE.xctoolchain/System/Library/PrivateFrameworks/LLDB.framework/Resources/Python",
    "LD_LIBRARY_PATH": "/Library/Developer/Toolchains/swift-5.5.1-RELEASE.xctoolchain/usr/lib/swift/macosx",
    "REPL_SWIFT_PATH": "/Library/Developer/Toolchains/swift-5.5.1-RELEASE.xctoolchain/System/Library/PrivateFrameworks/LLDB.framework/Resources/repl_swift"
  }
}

Any help would be appreciated!