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

Getting a Kernel Error when starting a Swift notebook #1

Open
giff-h opened this issue Feb 21, 2017 · 3 comments
Open

Getting a Kernel Error when starting a Swift notebook #1

giff-h opened this issue Feb 21, 2017 · 3 comments

Comments

@giff-h
Copy link

giff-h commented Feb 21, 2017

Traceback (most recent call last): File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/notebook/base/handlers.py", line 503, in wrapper result = yield gen.maybe_future(method(self, *args, **kwargs)) File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/tornado/gen.py", line 1015, in run value = future.result() File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/tornado/concurrent.py", line 237, in result raise_exc_info(self._exc_info) File "<string>", line 3, in raise_exc_info File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/tornado/gen.py", line 1021, in run yielded = self.gen.throw(*exc_info) File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/notebook/services/sessions/handlers.py", line 75, in post type=mtype)) File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/tornado/gen.py", line 1015, in run value = future.result() File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/tornado/concurrent.py", line 237, in result raise_exc_info(self._exc_info) File "<string>", line 3, in raise_exc_info File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/tornado/gen.py", line 1021, in run yielded = self.gen.throw(*exc_info) File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name) File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/tornado/gen.py", line 1015, in run value = future.result() File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/tornado/concurrent.py", line 237, in result raise_exc_info(self._exc_info) File "<string>", line 3, in raise_exc_info File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/tornado/gen.py", line 1021, in run yielded = self.gen.throw(*exc_info) File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 92, in start_kernel_for_session self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name) File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/tornado/gen.py", line 1015, in run value = future.result() File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/tornado/concurrent.py", line 237, in result raise_exc_info(self._exc_info) File "<string>", line 3, in raise_exc_info File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/tornado/gen.py", line 285, in wrapper yielded = next(result) File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/notebook/services/kernels/kernelmanager.py", line 87, in start_kernel super(MappingKernelManager, self).start_kernel(**kwargs) File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel km.start_kernel(**kwargs) File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/jupyter_client/manager.py", line 243, in start_kernel **kw) File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/jupyter_client/manager.py", line 189, in _launch_kernel return launch_kernel(kernel_cmd, **kw) File "/Users/hamstap85/.virtualenvs/moin/lib/python3.6/site-packages/jupyter_client/launcher.py", line 123, in launch_kernel proc = Popen(cmd, **kwargs) File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 707, in __init__ restore_signals, start_new_session) File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1326, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: '.build/debug/iSwift'

@giff-h
Copy link
Author

giff-h commented Feb 21, 2017

Sorry, didn't mean to submit immediately.

I'm on OSX. That's the error it spits out. It also gives these warnings on swift build:
/Users/hamstap85/Coding/builds/iSwift/Sources/BlockingQueue.swift:40:23: warning: result of call to 'wait(timeout:)' is unused dataSemaphore.wait(timeout: t) ^ ~~~~~~~~~~~~ /Users/hamstap85/Coding/builds/iSwift/Sources/REPLWrapper.swift:181:25: warning: result of call to 'wait(timeout:)' is unused promptSemaphore.wait(timeout: DispatchTime.distantFuture) ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/hamstap85/Coding/builds/iSwift/Sources/Shell.swift:52:9: warning: result of call to 'fcntl' is unused fcntl(fdMaster, F_SETFD, FD_CLOEXEC) ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/hamstap85/Coding/builds/iSwift/Sources/Shell.swift:53:9: warning: result of call to 'fcntl' is unused fcntl(fdSlave, F_SETFD, FD_CLOEXEC) ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@KelvinJin
Copy link
Owner

Gday, @hamstap85! The error indicates that the path of the generated swift executable is wrongly configured. You need to make sure the path inside your kernel.json is correctly pointed to the iSwift executable generated by running swift build. Normally, it would be under the hidden path called .build/debug/iSwift in your project folder.

The warnings from swift build are all safe. No need to worry about them.

Let me know how it goes. I know installing would be a bit painful without docker.

@lancekindle
Copy link

I was completely lost too. It would be great if there was an install script that would setup these variables....
I found a promising install script at
https://github.com/dsblank/simple_kernel/blob/master/install_script.sh

But for a quick fix, edit the iSwiftKernel/kernel.json and change
/root/iSwift/.build/debug/iSwift to represent the location where you've installed the iSwift-master folder, such as (if I put this folder in my /home/lance/bin folder):
/home/lance/bin/iSwift-master/.build/debug/iSwift

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants