JuliaGizmos / Interact.jl

Interactive widgets to play with your Julia code
Other
521 stars 75 forks source link

Interact v0.9.0 doesn't work with Jupyter Lab 0.33.7 #257

Open roberthoenig opened 6 years ago

roberthoenig commented 6 years ago
[1]: using Interact
KERNEL EXCEPTION
KeyError: key "command" not found

Stacktrace:
 [1] getindex at ./dict.jl:478 [inlined]
 [2] dispatch(::WebIO.IJuliaConnection, ::Dict{String,Any}) at /home/robert/.julia/packages/WebIO/WN6vl/src/connection.jl:22
 [3] (::getfield(WebIO, Symbol("##73#74")){WebIO.IJuliaConnection})(::IJulia.Msg) at /home/robert/.julia/packages/WebIO/WN6vl/src/providers/ijulia.jl:56
 [4] comm_msg(::ZMQ.Socket, ::IJulia.Msg) at /home/robert/.julia/packages/IJulia/iMVN2/src/comm_manager.jl:134
 [5] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [6] invokelatest at ./essentials.jl:685 [inlined]
 [7] eventloop(::ZMQ.Socket) at /home/robert/.julia/packages/IJulia/iMVN2/src/eventloop.jl:8
 [8] (::getfield(IJulia, Symbol("##15#18")))() at ./task.jl:259
KERNEL EXCEPTION
KeyError: key "command" not found

Stacktrace:
 [1] getindex at ./dict.jl:478 [inlined]
 [2] dispatch(::WebIO.IJuliaConnection, ::Dict{String,Any}) at /home/robert/.julia/packages/WebIO/WN6vl/src/connection.jl:22
 [3] (::getfield(WebIO, Symbol("##73#74")){WebIO.IJuliaConnection})(::IJulia.Msg) at /home/robert/.julia/packages/WebIO/WN6vl/src/providers/ijulia.jl:56
 [4] comm_msg(::ZMQ.Socket, ::IJulia.Msg) at /home/robert/.julia/packages/IJulia/iMVN2/src/comm_manager.jl:134
 [5] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [6] invokelatest at ./essentials.jl:685 [inlined]
 [7] eventloop(::ZMQ.Socket) at /home/robert/.julia/packages/IJulia/iMVN2/src/eventloop.jl:8
 [8] (::getfield(IJulia, Symbol("##15#18")))() at ./task.jl:259
KERNEL EXCEPTION
KeyError: key "command" not found

Stacktrace:
 [1] getindex at ./dict.jl:478 [inlined]
 [2] dispatch(::WebIO.IJuliaConnection, ::Dict{String,Any}) at /home/robert/.julia/packages/WebIO/WN6vl/src/connection.jl:22
 [3] (::getfield(WebIO, Symbol("##73#74")){WebIO.IJuliaConnection})(::IJulia.Msg) at /home/robert/.julia/packages/WebIO/WN6vl/src/providers/ijulia.jl:56
 [4] comm_msg(::ZMQ.Socket, ::IJulia.Msg) at /home/robert/.julia/packages/IJulia/iMVN2/src/comm_manager.jl:134
 [5] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [6] invokelatest at ./essentials.jl:685 [inlined]
 [7] eventloop(::ZMQ.Socket) at /home/robert/.julia/packages/IJulia/iMVN2/src/eventloop.jl:8
 [8] (::getfield(IJulia, Symbol("##15#18")))() at ./task.jl:259

I followed the instructions and ran

cd(Pkg.dir("WebIO", "assets"))
;jupyter labextension install webio
;jupyter labextension enable webio/jupyterlab_entry
piever commented 6 years ago

Thanks for reporting: it is actually a problem in WebIO: https://github.com/JuliaGizmos/WebIO.jl/issues/171

roberthoenig commented 6 years ago

I see. So it sounds like a workaround would be to downgrade WebIO?

roberthoenig commented 6 years ago

And if Interact doesn't depend on any features that are only available in the latest WebIO version, perhaps it could update its dependencies to explicitly pin to an older version of WebIO?

piever commented 6 years ago

You certainly will have more luck asking there: I actually don't really know how the Jupyter Lab / WebIO integration works in practice.

Regarding versions, I wouldn't recommend downgrading as only very recent WebIO versions are compatible with Julia 0.7 and above