gopherdata / gophernotes Goto Github PK
View Code? Open in Web Editor NEWThe Go kernel for Jupyter notebooks and nteract.
License: MIT License
The Go kernel for Jupyter notebooks and nteract.
License: MIT License
Repeating fmt.Println
from previous cells seems to be broken again.
run this in jupyter notebook
In [1]: import m "math"
In [2]: m.Sin(1)
# command-line-arguments
/var/folders/.../gophernotes_session.go:10: undefined: m in m.Sin
here's the spec
It is confusing that defining a main
function in the notebook (as described in all Go tutorials) results in an error. Maybe scrub the function declarations to remove the main wrapper, if declared?
Getting the following on go get -tags zmq_4_5 github.com/gopherds/gophernotes
not working :
could not determine kind of name for C.ZMQ_HWM
could not determine kind of name for C.ZMQ_MCAST_LOOP
could not determine kind of name for C.ZMQ_RECOVERY_IVL_MSEC
could not determine kind of name for C.ZMQ_SWAP
pkg-config: 0.28
zmq 4.1.5
Hello,
I installed gophernotes following the instructions and now Go
shows up as an option in my notebooks but when I try to execute something I get errors like
/var/folders/z5/zxdqxy_9595fs4z40wz496x40000gn/T/824132211/func_proxy.go:4:4: expected declaration, found 'IDENT' ...
I'm working with OS X El Capitan (10.11.6) and Go 1.9 (Issue was also present on 1.8)
Hi @dwhitena, I ran into an issue, haven't been able to load the Go kernel yet, this might be the reason:
☻ go get github.com/gophergala2016/gophernotes
could not determine kind of name for C.ZMQ_HWM
could not determine kind of name for C.ZMQ_MCAST_LOOP
could not determine kind of name for C.ZMQ_RECOVERY_IVL_MSEC
could not determine kind of name for C.ZMQ_SWAP
I believe I have successfully followed all of the instructions with the exception of the messages above. gophernotes is listed under my bin
directory. But when I open the gophernotes notebook, there is no Go kernel.
Could this be the reason and, if so, how to resolve it?
In looking into #84 I stumbled on this:
import ("fmt"; "os/user")
fmt.Println(user.Current())
&{0 0 root root /root}
// warning: expression returned 2 values, using only the first one: [0xc420170730 <nil>]
This appears to be jupyter condensing the pair of returns from fmt.Println
into a 2-tuple and then complaining about it.
Interestingly, the old behaviour of printing returned values when the would be useful has gone, so executing I have checked this in an old output and this is obviously a confabulation, though it would be nice that returns are actually printed (as is the case for the python kernel below), particularly if they are going to be complained about.user.Current()
outputs nothing, where in the past (from memory - I don't have a dwhitena/gophernotes that works here - I will check when I am back at that machine) it would have output the user and nil.
def foo():
return 1, 2
foo()
(1, 2)
Allow the following:
import (
"fmt"
"strings"
)
Expressions such as fmt.Println
within if/for/etc broken because of line-by-line parsing.
Opening this issue per our discussion on e779a2a. It seems gophernotes
doesn't quite conform to the Jupyter 5 messaging spec at the moment, because it drops support for the heartbeat thread which echoes back messages on the heartbeat socket.
While this isn't a problem for the common Jupyter frontends (notebook, console, etc.) it is causing a problem for me because I'm working on an alternate frontend that still expects heartbeats to work.
Thanks!
The README says to install zeromq22. If I run brew tap homebrew/versions && brew search zeromq
here are the available options:
homebrew/versions/zeromq32 homebrew/versions/zeromq405 zeromq ✔
I don't know whether zeromq32 works or not, I'm doing the the rest of the install now.
I downloaded the docker image and tried to follow along with a Hello World application (as i was having similar issues trying to just get it working via a miniconda installer (aka mini version of anaconda, python 3).
Jupyter works, starts up properly, but when i enter in the exact same thing as the README has for the hello world app, i don't see any Out's (except for the Sprintf() call).
See attached screen shot, i'm starting it as per the README:
$ docker run -p 18888:8888 -d dwhitena/gophernotes jupyter notebook --no-browser --ip=0.0.0.0
504f0499e5a8f57b202ddf06052fba45fe4cc2b3c10543315f4b395be33fe81c
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
504f0499e5a8 dwhitena/gophernotes "jupyter notebook ..." 9 minutes ago Up 8 minutes 0.0.0.0:18888->8888/tcp adoring_boyd
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
dwhitena/gophernotes latest 4cf782ddc225 6 months ago 979 MB
The 'Docker' section of this project main page reports these instructions to run the official images:
$ docker run -it -p 8888:8888 gopherdata/gophernotes
$ docker run -it -p 8888:8888 gopherdata/gophernotes-ds
However, both the command fail with this issue:
$ docker run -it -p 8888:8888 gopherdata/gophernotes
Unable to find image 'gopherdata/gophernotes:latest' locally
docker: Error response from daemon: manifest for gopherdata/gophernotes:latest not found.
See 'docker run --help'.
The error is caused by the lack of the 'latest' tag in docker hub. You should solve the tag issue or propose the user to use a tagged version instead of latest:
$ docker run -it -p 8888:8888 gopherdata/gophernotes:1.0.0
$ docker run -it -p 8888:8888 gopherdata/gophernotes-ds:1.0.0
When a fmt.Println()
statement or other print statement is included in a custom defined function, evaluating cells after defining the function results in duplicating the print statements.
facing "expected declaration, found 'package' " error while trying to run https://play.golang.org/p/ZdFpbahgC1 :
// Go's `math/rand` package provides
// [pseudorandom number](http://en.wikipedia.org/wiki/Pseudorandom_number_generator)
// generation.
package main
import "time"
import "fmt"
import "math/rand"
func main() {
// For example, `rand.Intn` returns a random `int` n,
// `0 <= n < 100`.
fmt.Print(rand.Intn(100), ",")
fmt.Print(rand.Intn(100))
fmt.Println()
// `rand.Float64` returns a `float64` `f`,
// `0.0 <= f < 1.0`.
fmt.Println(rand.Float64())
// This can be used to generate random floats in
// other ranges, for example `5.0 <= f' < 10.0`.
fmt.Print((rand.Float64()*5)+5, ",")
fmt.Print((rand.Float64() * 5) + 5)
fmt.Println()
// The default number generator is deterministic, so it'll
// produce the same sequence of numbers each time by default.
// To produce varying sequences, give it a seed that changes.
// Note that this is not safe to use for random numbers you
// intend to be secret, use `crypto/rand` for those.
s1 := rand.NewSource(time.Now().UnixNano())
r1 := rand.New(s1)
// Call the resulting `rand.Rand` just like the
// functions on the `rand` package.
fmt.Print(r1.Intn(100), ",")
fmt.Print(r1.Intn(100))
fmt.Println()
// If you seed a source with the same number, it
// produces the same sequence of random numbers.
s2 := rand.NewSource(42)
r2 := rand.New(s2)
fmt.Print(r2.Intn(100), ",")
fmt.Print(r2.Intn(100))
fmt.Println()
s3 := rand.NewSource(42)
r3 := rand.New(s3)
fmt.Print(r3.Intn(100), ",")
fmt.Print(r3.Intn(100))
}
code runs fine via 'go run' command line, any ideas on how to get around this?
Steps to reproduce (maybe?)
go install ./...
(I'm using go1.7)start Jupyter Notebook, start a Golang notebook
type the following
import "fmt"
fmt.Println("Hello World")
Then hit shift+enter. I get the following panic:
panic: exit status 2
goroutine 1 [running]:
panic(0x42ebe80, 0xc420288f60)
/Users/kevin/go/src/runtime/panic.go:500 +0x1a1
github.com/gopherds/gophernotes/internal/repl.(*Session).Eval(0xc4200ac370, 0xc420284c90, 0x27, 0xc42022d498, 0xc420286d70, 0x8, 0xc420288500, 0x0, 0x0, 0x0, ...)
/Users/kevin/code/go/src/github.com/gopherds/gophernotes/internal/repl/repl.go:355 +0xc01
main.HandleExecuteRequest(0xc4202884e0, 0x20, 0xc420286c98, 0x8, 0xc420288500, 0x20, 0xc420286ca0, 0xf, 0x0, 0x0, ...)
/Users/kevin/code/go/src/github.com/gopherds/gophernotes/execution.go:60 +0x2f3
main.HandleShellMsg(0xc4202884e0, 0x20, 0xc420286c98, 0x8, 0xc420288500, 0x20, 0xc420286ca0, 0xf, 0x0, 0x0, ...)
/Users/kevin/code/go/src/github.com/gopherds/gophernotes/gophernotes.go:108 +0x2c7
main.RunKernel(0x7fff5fbff495, 0x59, 0x44ab360, 0xc4200142a8)
/Users/kevin/code/go/src/github.com/gopherds/gophernotes/gophernotes.go:194 +0x836
main.main()
/Users/kevin/code/go/src/github.com/gopherds/gophernotes/main.go:25 +0xc6
Haven't investigated it at all.
Just downloaded and installed gophernotes on Ubuntu 16.04 and Go 1.9.1
I have the package dataframe installed from github.com/kniren/gotta/dataframe. I was able to start the gophernotes kernel successfully, but was unable to import any third party packages. I was able to use the text editor and terminal inside of jupyter to run code I was trying to run from the Go notebook, though.
Screenshot of gophernotes notebook:
package main
import "fmt"
import "os"
import "github.com/kniren/gota/dataframe"
func main() {
csvData, err := os.Open("test_data.csv")
if err != nil {
fmt.Println("could not open test_data.csv")
}
df := dataframe.ReadCSV(csvData)
dfSummary := df.Describe()
fmt.Println(df)
fmt.Printf("%v", dfSummary)
}
Results of go run
on that code
OS info if needed:
u0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial```
Is there any way to get auto-completion support (via e.g. gocode)?
If not possible right now, I think it would be an awesome addition.
Sorry to ask but it really seems hard for me to operate the instructions below.
REM Download w/o building.
go get -d github.com/gopherds/gophernotes
cd %GOPATH%\src\github.com\gopherds\gophernotes\zmq-win
REM Build x64 version.
build.bat amd64
move gophernotes.exe %GOPATH%\bin
copy lib-amd64\libzmq.dll %GOPATH%\bin
REM Build x86 version.
build.bat 386
move gophernotes.exe %GOPATH%\bin
copy lib-386\libzmq.dll %GOPATH%\bin
The logs display a lot of "exit status 2" messages without any further explanation of what went wrong or compiled incorrectly. Examples (I think):
Passing an incorrect type as a function arg
Referencing a variable that does not exist
Calling a function in a package without importing the package
Looks like this in the terminal:
[I 10:43:33.504 NotebookApp] Kernel restarted: 750c7c9c-da9a-4a2c-a1c4-64e0dc9d5195
[I 10:43:33.661 NotebookApp] Adapting to protocol v4.0 for kernel 750c7c9c-da9a-4a2c-a1c4-64e0dc9d5195
error: exit status 2
error: exit status 2
[I 10:45:20.245 NotebookApp] Saving file at /base58.ipynb
error: exit status 2
On the other hand I did get this error message once:
/var/folders/dx/x6gx95t14n7bb3v878968fkm0000gn/T/952273222/func_proxy.go:4:4: expected declaration, found 'for'
Ran the docker container version of this. Magic commands like %quickref
and %lsmagic
don't work.
The installation guide recommends installing to ~/.local/share, but the documented configuration directory is $HOME/.jupyter
. If you run jupyter --config-dir
, it should confirm this. The documentation also mentions this: http://jupyter.readthedocs.io/en/latest/projects/jupyter-directories.html?highlight=JUPYTER_CONFIG_DIR
The Worker Function of the worker pools example does not work, with the following error:
func literal evaluated but not used
Testing, I seem to get this error for any function of the form
func name() {
}
functions that use the following form work, but are limiting, because you wouldn't be able to compose functions onto structs to satisfy interfaces.
name := func() {
}
I have zmq4 in my mac, and I did try to install gophernotes. but there is a error:
could not determine kind of name for C.ZMQ_HWM
could not determine kind of name for C.ZMQ_MCAST_LOOP
could not determine kind of name for C.ZMQ_RECOVERY_IVL_MSEC
could not determine kind of name for C.ZMQ_SWAP
so i installed zmq2.2 by homebrew. how can i Iinstall gophernotes with zmq2.2 ?
This is obviously more of a question / feature request than an issue, but being able to do inline plotting and image display would be a big win for this package!
Maybe this issue can be a starting point for discussion (or feel free to point me to a more appropriate venue, if available).
Here's the problem as I understand it:
display_data
message type that the kernel can use to communicate image data results to the front end. http://jupyter-client.readthedocs.org/en/latest/messaging.html#id3Is there any way to bridge the impedance mismatch between 2) and 3)? If we can figure out a way to get image data out of the REPL, it seems pretty straightforward to implement the appropriate display_data
messages to communicate it back to the frontend.
In the meantime the only real way to do this is to write images to files and then embed them within markdown cells. But this is suboptimal both because it's clunky and because such images do not update live when the code that generates them changes due to caching, etc.
Anyway, making this work seemlessly would be an incredibly cool enhancement to this already very useful package. I'm pretty new to Go and Jupyter, but a very experienced developer otherwise, so I'm willing to help-out wherever I can.
Thanks!
Expressions like fmt.Println
linger in the session file when preceded by anything that would return an error from parser.ParseExpr
. Need to evalExpr
line by line a level up from here: https://github.com/gopherds/gophernotes/blob/master/internal/repl/repl.go#L157
After installing gophernotes I've got this message:
# github.com/gophergala2016/gophernotes/Godeps/_workspace/src/github.com/alecthomas/gozmq
could not determine kind of name for C.ZMQ_HWM
could not determine kind of name for C.ZMQ_MCAST_LOOP
could not determine kind of name for C.ZMQ_RECOVERY_IVL_MSEC
could not determine kind of name for C.ZMQ_SWAP
And running notebook:
Traceback` (most recent call last):
File "/usr/lib/python3.5/site-packages/notebook/base/handlers.py", line 458, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1014, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python3.5/site-packages/notebook/services/sessions/handlers.py", line 58, in post
sm.create_session(path=path, kernel_name=kernel_name))
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1014, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 73, in create_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 282, in wrapper
yielded = next(result)
File "/usr/lib/python3.5/site-packages/notebook/services/kernels/kernelmanager.py", line 87, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/usr/lib/python3.5/site-packages/jupyter_client/multikernelmanager.py", line 109, in start_kernel
km.start_kernel(**kwargs)
File "/usr/lib/python3.5/site-packages/jupyter_client/manager.py", line 244, in start_kernel
**kw)
File "/usr/lib/python3.5/site-packages/jupyter_client/manager.py", line 190, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/usr/lib/python3.5/site-packages/jupyter_client/launcher.py", line 123, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/usr/lib/python3.5/subprocess.py", line 950, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1544, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '/go/bin/gophernotes
When I wrote the code like the following In a note book
import "fmt"
hoge := func () int {
return 1
}
fmt.Println(hoge())
It works well.
On the other hand, if I try to define a function like this
func moge() int {
return 1
}
fmt.Println(moge())
It showed the error.
/tmp/361320456/func_proxy.go:8:1: expected declaration, found 'IDENT' fmt
Is that the correct behavior which is supposed?
self explanatory.
First of all, thanks a lot for this amazing project. But Windows support is missing... I can prepare a PR if it helps.
AFAIK, the change is minimal:
pkg-config
in vendor/github.com/alecthomas/gozmq
CGO_CFLAGS
and CGO_LDFLAGS
before invoking go build
Including pre-built zmq binaries may be convenient. Or even provide gophernotes.exe for download? 😄
On mac os X with docker for mac the command to run is docker run -p 8888:8888 --rm dwhitena/gophernotes jupyter notebook --no-browser --ip=0.0.0.0
It may be useful to update readme page
MacOS 10.13
On checking jupyter --data-dir
I see that the path is /Library/Jupyter
I copied the kernel files to this location however when I launch Jupyter the notebook does not show up.
Mac OSX 10.13
I get this error on running
go get github.com/gopherdata/gophernotes
I haven't really digged much into this yet, but though I should start with reporting that the dockerize command does not work for my scipipe example.
I'm getting this output in the terminal:
[samuel ex13jupyternotebook]$ jupyter notebook ex13jupyternotebook.ipynb
[I 10:07:44.211 NotebookApp] Serving notebooks from local directory: /home/samuel/code/go/src/github.com/samuell/scipipe/examples/ex13jupyternotebook
[I 10:07:44.212 NotebookApp] 0 active kernels
[I 10:07:44.212 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 10:07:44.212 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Created new window in existing browser session.
[I 10:07:46.470 NotebookApp] Kernel started: 2fe8c997-b1f6-49d7-9cc1-fad18e60971e
[I 10:07:46.560 NotebookApp] Adapting to protocol v4.0 for kernel 2fe8c997-b1f6-49d7-9cc1-fad18e60971e
Dockerizing
exit status 1
panic: exit status 1
goroutine 1 [running]:
github.com/gophergala2016/gophernotes/replpkg.actionContainerize(0xc8200aa160, 0x0, 0x0, 0x0, 0x0)
/home/samuel/code/go/src/github.com/gophergala2016/gophernotes/replpkg/commands.go:358 +0x849
github.com/gophergala2016/gophernotes/replpkg.(*Session).Eval(0xc8200aa160, 0xc8202386f0, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/home/samuel/code/go/src/github.com/gophergala2016/gophernotes/replpkg/repl.go:315 +0x12c5
main.HandleExecuteRequest(0xc82022ee00, 0x20, 0xc8202385d0, 0x8, 0xc82022ee20, 0x20, 0xc8202385e0, 0xf, 0x0, 0x0, ...)
/home/samuel/code/go/src/github.com/gophergala2016/gophernotes/execution.go:57 +0x30d
main.HandleShellMsg(0xc82022ee00, 0x20, 0xc8202385d0, 0x8, 0xc82022ee20, 0x20, 0xc8202385e0, 0xf, 0x0, 0x0, ...)
/home/samuel/code/go/src/github.com/gophergala2016/gophernotes/gophernotes.go:71 +0x9a
main.RunKernel(0x7ffec8299b3c, 0x47, 0x7f8855d5a1c0, 0xc82000e3c0)
/home/samuel/code/go/src/github.com/gophergala2016/gophernotes/gophernotes.go:157 +0x971
main.main()
/home/samuel/code/go/src/github.com/gophergala2016/gophernotes/main.go:25 +0x246
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/home/samuel/go/src/runtime/asm_amd64.s:1696 +0x1
goroutine 5 [syscall, locked to thread]:
github.com/gophergala2016/gophernotes/Godeps/_workspace/src/github.com/alecthomas/gozmq._C2func_zmq_device(0x2, 0x2606a50, 0x2606a50, 0x0, 0x0, 0x0)
??:0 +0x4d
github.com/gophergala2016/gophernotes/Godeps/_workspace/src/github.com/alecthomas/gozmq.Device(0x2, 0xc82022d9e0, 0xc82022d9e0, 0x0, 0x0)
/home/samuel/code/go/src/github.com/gophergala2016/gophernotes/Godeps/_workspace/src/github.com/alecthomas/gozmq/zmq.go:442 +0x57
created by main.PrepareSockets
/home/samuel/code/go/src/github.com/gophergala2016/gophernotes/gophernotes.go:60 +0x8bb
[I 10:07:52.469 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 2fe8c997-b1f6-49d7-9cc1-fad18e60971e restarted
System info:
OS: Xubuntu 14.04 LTS 64bit
Go version: go1.5 linux/amd64
Python version: 2.7.10
Environment: OSX 10.11.4, python 2.7.11, jupyter 4.1.0 installed via anaconda 4.0.0
My ~/.jupyter folder contains a single file named migrated, which I think was created when I installed anaconda (I had ipython previously installed).
Fix: Not until I copied the kernel.json file to my ~/.ipython directory (as opposed to ~/.local/share...) did the Golang kernel appear as an option under "New".
mkdir ~/.ipython/kernels/gophernotes
cp -r $GOPATH/src/github.com/gophergala2016/gophernotes/kernel/* ~/.ipython/kernels/gophernotes/
Update the examples and screenshots to include importing without the :
character and multiple imports per cell.
I tried running with the --debug
flag on but didn't get debug output, instead I commented out the if !debug
check in replpkg/log.go to force debug logging, and got the following info:
repl.go:118 could not import "github.com/k0kubun/pp": can't find import: github.com/k0kubun/pp
repl.go:118 could not import "github.com/davecgh/go-spew/spew": can't find import: github.com/davecgh/go-spew/spew
repl.go:118 could not import "fmt": reading export data: /Users/kevin/go/pkg/darwin_amd64/fmt.a: import error /Users/kevin/go/pkg/darwin_amd64/fmt.a:1:4 (byte offset = 3): expected keyword package, got "cn"
I'm guessing these don't get installed because they're not explicitly dependencies? I'm wondering if there's a way to force go get
to install them or at the very least mention it in the README.
I have completed the docker install for gophernotes, but (not being a regular docker user) I have no idea how to connect to the running container. Some instructions, or links to instructions if this is common knowledge, would be helpful.
Hi..I'm having the following issue
404 GET /static/components/MathJax/MathJax.js?config=TeX-AMS_HTML-full,Safe&delayStartupUntil=configured (::1) 17.28ms referer=http://localhost:8888/notebooks/Untitled.ipynb?kernel_name=gophernotes
[E 12:14:57.069 NotebookApp] Failed to run command:
['/go/bin/gophernotes', '/run/user/1001/jupyter/kernel-9211b0e6-8d3c-4252-a796-0e84361e6ce2.json']
with kwargs:
{'stdout': None, 'stderr': None, 'start_new_session': True, 'stdin': -1, 'cwd': '/home/yo/Documentos/proyectos/clojure', 'env': {'PHPBREW_ROOT': '/home/yo/.phpbrew', 'PHPBREW_LOOKUP_PREFIX': '', 'PHPBREW_PHP': 'php-5.6.22', 'GDMSESSION': 'gnome-classic', 'MAIL': '/var/spool/mail/yo', 'SBT_OPTS': '-Xmx512M -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Duser.timezone=GMT', 'SHLVL': '1', 'XDG_SESSION_TYPE': 'x11', 'SHELL': '/bin/zsh', 'MOZ_PLUGIN_PATH': '/usr/lib/mozilla/plugins', 'EDITOR': 'nano', 'QT_QPA_PLATFORMTHEME': 'qgnomeplatform', 'GTK_MODULES': 'canberra-gtk-module', 'HG': '/usr/bin/hg', 'USER': 'yo', 'TERM': 'xterm-256color', 'HOME': '/home/yo', 'ANT_HOME': '/usr/share/apache-ant', 'DESKTOP_SESSION': 'gnome-classic', 'GSETTINGS_SCHEMA_DIR': '/home/yo/data', 'GNOME_SHELL_SESSION_MODE': 'classic', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'VTE_VERSION': '4203', '_': '/usr/bin/jupyter', 'SESSION_MANAGER': 'local/yo-pc:@/tmp/.ICE-unix/932,unix/yo-pc:/tmp/.ICE-unix/932', 'GOPATH': '/home/yo/Documentos/proyectos/go', 'PHPBREW_PATH': '/home/yo/.phpbrew/php/php-5.6.22/bin', 'XDG_SEAT': 'seat0', 'SSH_AUTH_SOCK': '/run/user/1001/keyring/ssh', 'DISPLAY': ':0', 'BROWSER': '/usr/bin/google-chrome-stable', 'PATH': '/home/yo/comandos:/home/yo/.phpbrew/php/php-5.6.22/bin:/home/yo/.phpbrew/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/yo/Documentos/proyectos/go/bin', 'PHPBREW_VERSION_REGEX': '^([[:digit:]]+\\.){2}[[:digit:]]+$', 'PWD': '/home/yo/Documentos/proyectos/clojure', 'OLDPWD': '/home/yo/Documentos/proyectos/clojure/parser', 'XDG_VTNR': '2', 'GDM_LANG': 'es_ES.UTF-8', 'LOGNAME': 'yo', 'WINDOWID': '29360134', 'XDG_MENU_PREFIX': 'gnome-', 'XDG_RUNTIME_DIR': '/run/user/1001', 'JPY_PARENT_PID': '14559', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1001/bus', 'XDG_SESSION_ID': 'c2', 'LANG': 'es_ES.UTF-8', 'AUTOJUMP_SOURCED': '1', 'PHPBREW_HOME': '/home/yo/.phpbrew', 'XAUTHORITY': '/run/user/1001/gdm/Xauthority', 'PATH_WITHOUT_PHPBREW': '/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl', 'AUTOJUMP_ERROR_PATH': '/home/yo/.local/share/autojump/errors.log', 'XDG_CURRENT_DESKTOP': 'GNOME-Classic:GNOME', 'WINDOWPATH': '2', 'XDG_SESSION_DESKTOP': 'gnome-classic', 'USERNAME': 'yo', 'PHPBREW_BIN': '/home/yo/.phpbrew/bin'}}
[E 12:14:57.071 NotebookApp] Unhandled error in API request
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/notebook/base/handlers.py", line 457, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python3.5/site-packages/notebook/services/sessions/handlers.py", line 62, in post
kernel_id=kernel_id))
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
kernel_name)
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python3.5/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 "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 285, in wrapper
yielded = next(result)
File "/usr/lib/python3.5/site-packages/notebook/services/kernels/kernelmanager.py", line 87, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/usr/lib/python3.5/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "/usr/lib/python3.5/site-packages/jupyter_client/manager.py", line 243, in start_kernel
**kw)
File "/usr/lib/python3.5/site-packages/jupyter_client/manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/usr/lib/python3.5/site-packages/jupyter_client/launcher.py", line 123, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '/go/bin/gophernotes'
[E 12:14:57.091 NotebookApp] {
"Connection": "keep-alive",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36",
"Origin": "http://localhost:8888",
"Content-Type": "application/json",
"Host": "localhost:8888",
"Accept-Encoding": "gzip, deflate",
"X-Requested-With": "XMLHttpRequest",
"Referer": "http://localhost:8888/notebooks/Untitled.ipynb?kernel_name=gophernotes",
"Accept-Language": "es,en-CA;q=0.8,en;q=0.6",
"Content-Length": "80",
"Accept": "application/json, text/javascript, */*; q=0.01"
}
[E 12:14:57.092 NotebookApp] 500 POST /api/sessions (::1) 169.37ms referer=http://localhost:8888/notebooks/Untitled.ipynb?kernel_name=gophernotes
[W 12:16:00.779 NotebookApp] 404 GET /static/components/backbone/backbone-min.map (::1) 2.53ms referer=None
[I 12:16:56.976 NotebookApp] Saving file at /Untitled.ipynb
[W 12:17:38.556 NotebookApp] 404 GET /static/components/MathJax/MathJax.js?config=TeX-AMS_HTML-full,Safe&delayStartupUntil=configured (::1) 3.57ms referer=http://localhost:8888/notebooks/Untitled.ipynb?kernel_name=gophernotes
[E 12:17:39.757 NotebookApp] Failed to run command:
['/go/bin/gophernotes', '/run/user/1001/jupyter/kernel-c91df6b9-3cdf-4613-ad84-bd6bfc8fe9e9.json']
with kwargs:
{'stdout': None, 'stderr': None, 'start_new_session': True, 'stdin': -1, 'cwd': '/home/yo/Documentos/proyectos/clojure', 'env': {'PHPBREW_ROOT': '/home/yo/.phpbrew', 'PHPBREW_LOOKUP_PREFIX': '', 'PHPBREW_PHP': 'php-5.6.22', 'GDMSESSION': 'gnome-classic', 'MAIL': '/var/spool/mail/yo', 'SBT_OPTS': '-Xmx512M -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Duser.timezone=GMT', 'SHLVL': '1', 'XDG_SESSION_TYPE': 'x11', 'SHELL': '/bin/zsh', 'MOZ_PLUGIN_PATH': '/usr/lib/mozilla/plugins', 'EDITOR': 'nano', 'QT_QPA_PLATFORMTHEME': 'qgnomeplatform', 'GTK_MODULES': 'canberra-gtk-module', 'HG': '/usr/bin/hg', 'USER': 'yo', 'TERM': 'xterm-256color', 'HOME': '/home/yo', 'ANT_HOME': '/usr/share/apache-ant', 'DESKTOP_SESSION': 'gnome-classic', 'GSETTINGS_SCHEMA_DIR': '/home/yo/data', 'GNOME_SHELL_SESSION_MODE': 'classic', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'VTE_VERSION': '4203', '_': '/usr/bin/jupyter', 'SESSION_MANAGER': 'local/yo-pc:@/tmp/.ICE-unix/932,unix/yo-pc:/tmp/.ICE-unix/932', 'GOPATH': '/home/yo/Documentos/proyectos/go', 'PHPBREW_PATH': '/home/yo/.phpbrew/php/php-5.6.22/bin', 'XDG_SEAT': 'seat0', 'SSH_AUTH_SOCK': '/run/user/1001/keyring/ssh', 'DISPLAY': ':0', 'BROWSER': '/usr/bin/google-chrome-stable', 'PATH': '/home/yo/comandos:/home/yo/.phpbrew/php/php-5.6.22/bin:/home/yo/.phpbrew/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/yo/Documentos/proyectos/go/bin', 'PHPBREW_VERSION_REGEX': '^([[:digit:]]+\\.){2}[[:digit:]]+$', 'PWD': '/home/yo/Documentos/proyectos/clojure', 'OLDPWD': '/home/yo/Documentos/proyectos/clojure/parser', 'XDG_VTNR': '2', 'GDM_LANG': 'es_ES.UTF-8', 'LOGNAME': 'yo', 'WINDOWID': '29360134', 'XDG_MENU_PREFIX': 'gnome-', 'XDG_RUNTIME_DIR': '/run/user/1001', 'JPY_PARENT_PID': '14559', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1001/bus', 'XDG_SESSION_ID': 'c2', 'LANG': 'es_ES.UTF-8', 'AUTOJUMP_SOURCED': '1', 'PHPBREW_HOME': '/home/yo/.phpbrew', 'XAUTHORITY': '/run/user/1001/gdm/Xauthority', 'PATH_WITHOUT_PHPBREW': '/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl', 'AUTOJUMP_ERROR_PATH': '/home/yo/.local/share/autojump/errors.log', 'XDG_CURRENT_DESKTOP': 'GNOME-Classic:GNOME', 'WINDOWPATH': '2', 'XDG_SESSION_DESKTOP': 'gnome-classic', 'USERNAME': 'yo', 'PHPBREW_BIN': '/home/yo/.phpbrew/bin'}}
[E 12:17:39.757 NotebookApp] Unhandled error in API request
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/notebook/base/handlers.py", line 457, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python3.5/site-packages/notebook/services/sessions/handlers.py", line 62, in post
kernel_id=kernel_id))
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
kernel_name)
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python3.5/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 "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 285, in wrapper
yielded = next(result)
File "/usr/lib/python3.5/site-packages/notebook/services/kernels/kernelmanager.py", line 87, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/usr/lib/python3.5/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "/usr/lib/python3.5/site-packages/jupyter_client/manager.py", line 243, in start_kernel
**kw)
File "/usr/lib/python3.5/site-packages/jupyter_client/manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/usr/lib/python3.5/site-packages/jupyter_client/launcher.py", line 123, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '/go/bin/gophernotes'
[E 12:17:39.760 NotebookApp] {
"Connection": "keep-alive",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36",
"Origin": "http://localhost:8888",
"Content-Type": "application/json",
"Host": "localhost:8888",
"Accept-Encoding": "gzip, deflate",
"X-Requested-With": "XMLHttpRequest",
"Referer": "http://localhost:8888/notebooks/Untitled.ipynb?kernel_name=gophernotes",
"Accept-Language": "es,en-CA;q=0.8,en;q=0.6",
"Content-Length": "80",
"Accept": "application/json, text/javascript, */*; q=0.01"
}
[E 12:17:39.760 NotebookApp] 500 POST /api/sessions (::1) 26.21ms referer=http://localhost:8888/notebooks/Untitled.ipynb?kernel_name=gophernotes
^C[I 12:17:46.038 NotebookApp] interrupted
Serving notebooks from local directory: /home/yo/Documentos/proyectos/clojure
0 active kernels
The Jupyter Notebook is running at: http://localhost:8888/
Shutdown this notebook server (y/[n])? y
[C 12:17:48.767 NotebookApp] Shutdown confirmed
[I 12:17:48.767 NotebookApp] Shutting down kernels
yo ~ Documentos proyectos clojure jupyter notebook
[I 12:17:51.802 NotebookApp] Serving notebooks from local directory: /home/yo/Documentos/proyectos/clojure
[I 12:17:51.803 NotebookApp] 0 active kernels
[I 12:17:51.803 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 12:17:51.803 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Se ha abierto una nueva ventana en la sesión actual del navegador.
[I 12:17:58.287 NotebookApp] Creating new notebook in
[W 12:17:58.800 NotebookApp] 404 GET /static/components/MathJax/MathJax.js?config=TeX-AMS_HTML-full,Safe&delayStartupUntil=configured (::1) 21.05ms referer=http://localhost:8888/notebooks/Untitled1.ipynb?kernel_name=gophernotes
[E 12:17:59.866 NotebookApp] Failed to run command:
['/go/bin/gophernotes', '/run/user/1001/jupyter/kernel-0f8518f6-3a4c-4ca0-89db-59aab477f12a.json']
with kwargs:
{'stderr': None, 'env': {'ANT_HOME': '/usr/share/apache-ant', 'XDG_VTNR': '2', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'USER': 'yo', 'HOME': '/home/yo', 'VTE_VERSION': '4203', 'XAUTHORITY': '/run/user/1001/gdm/Xauthority', 'AUTOJUMP_SOURCED': '1', 'GNOME_SHELL_SESSION_MODE': 'classic', 'LANG': 'es_ES.UTF-8', 'HG': '/usr/bin/hg', 'QT_QPA_PLATFORMTHEME': 'qgnomeplatform', 'SESSION_MANAGER': 'local/yo-pc:@/tmp/.ICE-unix/932,unix/yo-pc:/tmp/.ICE-unix/932', 'PHPBREW_PATH': '/home/yo/.phpbrew/php/php-5.6.22/bin', 'DESKTOP_SESSION': 'gnome-classic', 'PHPBREW_VERSION_REGEX': '^([[:digit:]]+\\.){2}[[:digit:]]+$', 'SHELL': '/bin/zsh', 'XDG_SESSION_ID': 'c2', 'SSH_AUTH_SOCK': '/run/user/1001/keyring/ssh', 'EDITOR': 'nano', 'AUTOJUMP_ERROR_PATH': '/home/yo/.local/share/autojump/errors.log', 'WINDOWID': '29360134', 'PATH': '/home/yo/comandos:/home/yo/.phpbrew/php/php-5.6.22/bin:/home/yo/.phpbrew/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/yo/Documentos/proyectos/go/bin', 'MOZ_PLUGIN_PATH': '/usr/lib/mozilla/plugins', 'USERNAME': 'yo', 'XDG_SESSION_DESKTOP': 'gnome-classic', 'OLDPWD': '/home/yo/Documentos/proyectos/clojure/parser', 'PHPBREW_ROOT': '/home/yo/.phpbrew', 'WINDOWPATH': '2', 'TERM': 'xterm-256color', 'PHPBREW_BIN': '/home/yo/.phpbrew/bin', 'GDM_LANG': 'es_ES.UTF-8', 'GOPATH': '/home/yo/Documentos/proyectos/go', 'XDG_RUNTIME_DIR': '/run/user/1001', 'PHPBREW_HOME': '/home/yo/.phpbrew', '_': '/usr/bin/jupyter', 'JPY_PARENT_PID': '14737', 'BROWSER': '/usr/bin/google-chrome-stable', 'PATH_WITHOUT_PHPBREW': '/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl', 'SHLVL': '1', 'XDG_SESSION_TYPE': 'x11', 'XDG_SEAT': 'seat0', 'LOGNAME': 'yo', 'GTK_MODULES': 'canberra-gtk-module', 'XDG_MENU_PREFIX': 'gnome-', 'MAIL': '/var/spool/mail/yo', 'PHPBREW_PHP': 'php-5.6.22', 'SBT_OPTS': '-Xmx512M -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Duser.timezone=GMT', 'PWD': '/home/yo/Documentos/proyectos/clojure', 'GSETTINGS_SCHEMA_DIR': '/home/yo/data', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1001/bus', 'GDMSESSION': 'gnome-classic', 'DISPLAY': ':0', 'XDG_CURRENT_DESKTOP': 'GNOME-Classic:GNOME', 'PHPBREW_LOOKUP_PREFIX': ''}, 'cwd': '/home/yo/Documentos/proyectos/clojure', 'stdout': None, 'stdin': -1, 'start_new_session': True}
[E 12:17:59.866 NotebookApp] Unhandled error in API request
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/notebook/base/handlers.py", line 457, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python3.5/site-packages/notebook/services/sessions/handlers.py", line 62, in post
kernel_id=kernel_id))
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
kernel_name)
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python3.5/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 "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 285, in wrapper
yielded = next(result)
File "/usr/lib/python3.5/site-packages/notebook/services/kernels/kernelmanager.py", line 87, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/usr/lib/python3.5/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "/usr/lib/python3.5/site-packages/jupyter_client/manager.py", line 243, in start_kernel
**kw)
File "/usr/lib/python3.5/site-packages/jupyter_client/manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/usr/lib/python3.5/site-packages/jupyter_client/launcher.py", line 123, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '/go/bin/gophernotes'
[E 12:17:59.874 NotebookApp] {
"Accept": "application/json, text/javascript, */*; q=0.01",
"X-Requested-With": "XMLHttpRequest",
"Connection": "keep-alive",
"Host": "localhost:8888",
"Content-Type": "application/json",
"Content-Length": "81",
"Origin": "http://localhost:8888",
"Referer": "http://localhost:8888/notebooks/Untitled1.ipynb?kernel_name=gophernotes",
"Accept-Language": "es,en-CA;q=0.8,en;q=0.6",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36",
"Accept-Encoding": "gzip, deflate"
}
[E 12:17:59.875 NotebookApp] 500 POST /api/sessions (::1) 72.57ms referer=http://localhost:8888/notebooks/Untitled1.ipynb?kernel_name=gophernotes
kernel error
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/notebook/base/handlers.py", line 457, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python3.5/site-packages/notebook/services/sessions/handlers.py", line 62, in post
kernel_id=kernel_id))
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
kernel_name)
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "/usr/lib/python3.5/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 "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 285, in wrapper
yielded = next(result)
File "/usr/lib/python3.5/site-packages/notebook/services/kernels/kernelmanager.py", line 87, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/usr/lib/python3.5/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "/usr/lib/python3.5/site-packages/jupyter_client/manager.py", line 243, in start_kernel
**kw)
File "/usr/lib/python3.5/site-packages/jupyter_client/manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/usr/lib/python3.5/site-packages/jupyter_client/launcher.py", line 123, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '/go/bin/gophernotes'
I'm not sure but I think than probably the error is because jupyter is trying to found the gophernotes binary inside /go/bin/gophernote (I don't know what is the root foolder for this relative path) and it's fails because my gophernotes is inside ~/Documents/projecs/go/bin/gophernotes
what could be the best way for solve it? thank you so much!!!
This code handling zmq messages needs to be refactored to pass linting and conform to Go formatting etc. Also, it would be nice to generalize this to be less dependent on zmq version.
This continues from #84 (comment)
Reproducer is:
In jupyter terminal excute a go get
command for github.com/kortschak/graphprac:
(ugh, copy/paste from jupyter terminal is horrible)
/ # go get -v github.com/kortschak/graphprac
github.com/kortschak/graphprac (download)
created GOPATH=/root/go; see 'go help gopath'
Fetching https://gonum.org/v1/gonum/graph?go-get=1
Parsing meta tags from https://gonum.org/v1/gonum/graph?go-get=1 (status code 404)
get "gonum.org/v1/gonum/graph": found meta tag get.metaImport{Prefix:"gonum.org/v1/gonum", VCS:"git", RepoRoot:"https://github.com/gonum/gonum"} at https://gonum.org/v1/gonum/graph?go-get=1
get "gonum.org/v1/gonum/graph": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/gonum?go-get=1
Parsing meta tags from https://gonum.org/v1/gonum?go-get=1 (status code 404)
gonum.org/v1/gonum (download)
Fetching https://gonum.org/v1/gonum/graph/community?go-get=1
Parsing meta tags from https://gonum.org/v1/gonum/graph/community?go-get=1 (status code 404)
get "gonum.org/v1/gonum/graph/community": found meta tag get.metaImport{Prefix:"gonum.org/v1/gonum", VCS:"git", RepoRoot:"https://github.com/gonum/gonum"} at https://gonum.org/v1/gonum/graph/community?go-get=1
get "gonum.org/v1/gonum/graph/community": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/gonum/graph/simple?go-get=1
Parsing meta tags from https://gonum.org/v1/gonum/graph/simple?go-get=1 (status code 404)
get "gonum.org/v1/gonum/graph/simple": found meta tag get.metaImport{Prefix:"gonum.org/v1/gonum", VCS:"git", RepoRoot:"https://github.com/gonum/gonum"} at https://gonum.org/v1/gonum/graph/simple?go-get=1
get "gonum.org/v1/gonum/graph/simple": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/gonum/graph/topo?go-get=1
Parsing meta tags from https://gonum.org/v1/gonum/graph/topo?go-get=1 (status code 404)
get "gonum.org/v1/gonum/graph/topo": found meta tag get.metaImport{Prefix:"gonum.org/v1/gonum", VCS:"git", RepoRoot:"https://github.com/gonum/gonum"} at https://gonum.org/v1/gonum/graph/topo?go-get=1
get "gonum.org/v1/gonum/graph/topo": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/gonum/graph/encoding?go-get=1
Parsing meta tags from https://gonum.org/v1/gonum/graph/encoding?go-get=1 (status code 404)
get "gonum.org/v1/gonum/graph/encoding": found meta tag get.metaImport{Prefix:"gonum.org/v1/gonum", VCS:"git", RepoRoot:"https://github.com/gonum/gonum"} at https://gonum.org/v1/gonum/graph/encoding?go-get=1
get "gonum.org/v1/gonum/graph/encoding": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/gonum/graph/encoding/dot?go-get=1
Parsing meta tags from https://gonum.org/v1/gonum/graph/encoding/dot?go-get=1 (status code 404)
get "gonum.org/v1/gonum/graph/encoding/dot": found meta tag get.metaImport{Prefix:"gonum.org/v1/gonum", VCS:"git", RepoRoot:"https://github.com/gonum/gonum"} at https://gonum.org/v1/gonum/graph/encoding/dot?go-get=1
get "gonum.org/v1/gonum/graph/encoding/dot": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/gonum/graph/network?go-get=1
Parsing meta tags from https://gonum.org/v1/gonum/graph/network?go-get=1 (status code 404)
get "gonum.org/v1/gonum/graph/network": found meta tag get.metaImport{Prefix:"gonum.org/v1/gonum", VCS:"git", RepoRoot:"https://github.com/gonum/gonum"} at https://gonum.org/v1/gonum/graph/network?go-get=1
get "gonum.org/v1/gonum/graph/network": verifying non-authoritative meta tag
Fetching https://gonum.org/v1/gonum/graph/path?go-get=1
Parsing meta tags from https://gonum.org/v1/gonum/graph/path?go-get=1 (status code 404)
get "gonum.org/v1/gonum/graph/path": found meta tag get.metaImport{Prefix:"gonum.org/v1/gonum", VCS:"git", RepoRoot:"https://github.com/gonum/gonum"} at https://gonum.org/v1/gonum/graph/path?go-get=1
get "gonum.org/v1/gonum/graph/path": verifying non-authoritative meta tag
gonum.org/v1/gonum/internal/asm/c128
gonum.org/v1/gonum/internal/asm/f32
gonum.org/v1/gonum/graph
gonum.org/v1/gonum/blas
gonum.org/v1/gonum/internal/asm/f64
gonum.org/v1/gonum/internal/math32
gonum.org/v1/gonum/graph/formats/dot/ast
gonum.org/v1/gonum/graph/formats/dot/internal/token
gonum.org/v1/gonum/graph/formats/dot/internal/lexer
gonum.org/v1/gonum/graph/formats/dot/internal/astx
gonum.org/v1/gonum/graph/formats/dot/internal/errors
gonum.org/v1/gonum/graph/internal/ordered
gonum.org/v1/gonum/graph/internal/set
gonum.org/v1/gonum/graph/internal/linear
gonum.org/v1/gonum/graph/encoding
gonum.org/v1/gonum/lapack
gonum.org/v1/gonum/graph/formats/dot/internal/parser
gonum.org/v1/gonum/graph/traverse
gonum.org/v1/gonum/graph/topo
gonum.org/v1/gonum/blas/gonum
gonum.org/v1/gonum/floats
gonum.org/v1/gonum/graph/formats/dot
gonum.org/v1/gonum/graph/encoding/dot
gonum.org/v1/gonum/blas/blas64
gonum.org/v1/gonum/lapack/gonum
gonum.org/v1/gonum/lapack/lapack64
gonum.org/v1/gonum/mat
gonum.org/v1/gonum/graph/simple
gonum.org/v1/gonum/graph/community
gonum.org/v1/gonum/graph/path
gonum.org/v1/gonum/graph/network
github.com/kortschak/graphprac
This creates a new GOPATH in ~root
where there is an ipynb file to run. Open this and execute the first cell:
import (
"fmt"
"log"
"github.com/kortschak/graphprac"
)
# gomacro_imports/github.com/kortschak/graphprac
./graphprac.go:37:1: syntax error: unexpected }, expecting expression
error executing "go build -buildmode=plugin" in directory "/root/go/src/gomacro_imports/github.com/kortschak/graphprac/": exit status 2
The equivalent set of operations works as expected on a local gophernotes install.
https://github.com/gopherdata/gophernotes/blame/master/README.md#L292
Needs to be upper-cased to match ec9037f
Executing a cell with an invalid "for" loop causes a panic and kills the Jupyter kernel:
Correct build error: syntax error: unexpected ++, expecting expression
Correct build error: syntax error: unexpected {, expecting semicolon or newline
Output in shell running "jupyter notebook":
func_proxy.go:4:4: expected declaration, found 'for'
panic: exit status 2
goroutine 1 [running]:
panic(0x42d8640, 0xc4202cc0a0)
/usr/local/Cellar/go/1.7/libexec/src/runtime/panic.go:500 +0x1a1
github.com/gopherds/gophernotes/internal/repl.(*Session).Eval(0xc4200b2370, 0xc42024ef80, 0x3c, 0xc4202e3488, 0xc420013580, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
<$GOPATH>/src/github.com/gopherds/gophernotes/internal/repl/repl.go:374 +0x19a3
main.HandleExecuteRequest(0xc42046f6c0, 0x20, 0xc4200134a8, 0x8, 0xc42046f700, 0x20, 0xc4200134d0, 0xf, 0x0, 0x0, ...)
<$GOPATH>/src/github.com/gopherds/gophernotes/execution.go:60 +0x2f3
main.HandleShellMsg(0xc42046f6c0, 0x20, 0xc4200134a8, 0x8, 0xc42046f700, 0x20, 0xc4200134d0, 0xf, 0x0, 0x0, ...)
<$GOPATH>/src/github.com/gopherds/gophernotes/gophernotes.go:108 +0x2c7
main.RunKernel(0x7fff5fbff6ae, 0x59, 0x4493360, 0xc4200122a8)
<$GOPATH>/src/github.com/gopherds/gophernotes/gophernotes.go:194 +0x842
main.main()
<$GOPATH>/src/github.com/gopherds/gophernotes/main.go:25 +0xc6
Running on OS X 10.11.6, Golang 1.7
This code snippet:
:import "github.com/go-yaml/yaml"
:import "fmt"
var data = `
a: Easy!
b:
c: "\xf6\xac"
`
type T struct {
A string
B struct {
RenamedC []byte `yaml:"c"`
}
}
t := T{}
err := yaml.Unmarshal([]byte(data), &t)
if err != nil {
fmt.Printf("error: %v", err)
}
fmt.Printf("%#v\n", t)
fails when you run it twice, with the following error:
gophernotes_session.go:36: data redeclared in this block
previous declaration at /var/folders/dx/x6gx95t14n7bb3v878968fkm0000gn/T/842705212/gophernotes_session.go:19
When running the :print
command, it outputs in the terminal where the notebook server is running instead of the browser. Maybe it defaults to stderr instead of stdout?
gomacro
issues warning that are awkward for some workflows. See, e.g., https://github.com/gopherdata/gophernotes/blob/master/examples/Facial_Recognition_MachineBox.ipynb
$ docker run --name gophernotes --net host -it dwhitena/gophernotes:latest
[I 09:52:12.780 NotebookApp] Copying /.ipython/kernels -> /.local/share/jupyter/kernels
[I 09:52:12.790 NotebookApp] Writing notebook server cookie secret to /.local/share/jupyter/runtime/notebook_cookie_secret
[I 09:52:12.860 NotebookApp] Serving notebooks from local directory: /
[I 09:52:12.860 NotebookApp] 0 active kernels
[I 09:52:12.860 NotebookApp] The IPython Notebook is running at: http://localhost:8888/
[I 09:52:12.860 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 09:52:12.860 NotebookApp] No web browser found: could not locate runnable browser.
and when stopping:
^C[I 09:53:45.030 NotebookApp] interrupted
Serving notebooks from local directory: /
0 active kernels
The IPython Notebook is running at: http://localhost:8888/
Shutdown this notebook server (y/[n])? ^C[C 09:53:46.720 NotebookApp] received signal 2, stopping
[I 09:53:46.720 NotebookApp] Shutting down kernels
$ docker version
Client:
Version: 1.10.0
API version: 1.22
Go version: go1.5.3
Git commit: 590d510
Built: Fri Feb 5 08:21:41 UTC 2016
OS/Arch: darwin/amd64
Server:
Version: 1.10.0
API version: 1.22
Go version: go1.5.3
Git commit: 590d5108
Built: Thu Feb 4 19:55:25 2016
OS/Arch: linux/amd64
I assume it's because the NotebookApp tries to find its own server by pinging localhost, which on OS X using boot2docker
or dlite
does not make sense as the guest's container runs inside a VM rather the host.
I tried this:
import yaml "gopkg.in/yaml.v2"
yields the following error when I try to use it:
undefined: yaml in yaml.Unmarshal
When I run a simple if/else statement in a docker like this:
if 7%2 == 0 {
fmt.Println("7 is even")
} else {
fmt.Println("7 is odd")
}
it failed to run and the server log output is:
Error running goimports:
/tmp/002613501/func_proxy.go:4:4: expected declaration, found 'if'
regarding a for loop, it works for a single line code like this "for i:= 1; i < 5; i++ {fmt.Println("Line %s", i)}"
but not work if format the code like this:
for i:= 1; i < 5; i++ {
fmt.Println("Line %s", i)
}
what is the limitation here?
When spinning up a jupyter notebook server, you can select a *.ipynb
file from the directory viewer. However, this does not force the opening of the file with the Golang kernel. It just uses the default Python kernel.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.