Pluto.jl icon indicating copy to clipboard operation
Pluto.jl copied to clipboard

"Update notebook failed", "KeyError: key :dot not found" in RunBonds.

Open BioTurboNick opened this issue 2 years ago • 2 comments

Unfortunately I don't know what caused this at the moment, but I assume it shouldn't happen, so thought I should report it.

I'll add more if I can. Might be new in v0.19.0, as I don't recall seeing it in v0.18.2 which I was running before.

┌ Error: Update notebook failed
│   🙋.body["updates"] =
│    3-element Vector{Dict{Any, Any}}:
│     Dict("value" => Dict{Any, Any}("value" => 1), "op" => "add", "path" => ["bonds", "mode_idx"])
│     Dict("value" => Dict{Any, Any}("value" => 1), "op" => "add", "path" => ["bonds", "video"])
│     Dict("value" => Dict{Any, Any}("value" => 1), "op" => "add", "path" => ["bonds", "dot"])
│   exception =
│    KeyError: key :dot not found
│    Stacktrace:
│      [1] getindex(h::Dict{Symbol, Pluto.BondValue}, key::Symbol)
│        @ Base ./dict.jl:498
│      [2] (::Pluto.var"#235#240"{Pluto.ServerSession, Pluto.Notebook})(::Tuple{Symbol, Bool})
│        @ Pluto ~/.julia/packages/Pluto/4cF9Y/src/evaluation/RunBonds.jl:10
│      [3] filter(f::Pluto.var"#235#240"{Pluto.ServerSession, Pluto.Notebook}, a::Vector{Tuple{Symbol, Bool}})
│        @ Base ./array.jl:2533
│      [4] set_bond_values_reactive(; session::Pluto.ServerSession, notebook::Pluto.Notebook, bound_sym_names::Vector{Symbol}, is_first_values::Vector{Bool}, initiator::Pluto.Initiator, kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:run_async,), Tuple{Bool}}})
│        @ Pluto ~/.julia/packages/Pluto/4cF9Y/src/evaluation/RunBonds.jl:9
│      [5] response_update_notebook(🙋::Pluto.ClientRequest)
│        @ Pluto ~/.julia/packages/Pluto/4cF9Y/src/webserver/Dynamic.jl:326
│      [6] process_ws_message(session::Pluto.ServerSession, parentbody::Dict{Any, Any}, clientstream::HTTP.WebSockets.WebSocket{HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}})
│        @ Pluto ~/.julia/packages/Pluto/4cF9Y/src/webserver/WebServer.jl:402
│      [7] (::Pluto.var"#358#370"{Pluto.ServerSession, Base.RefValue{Function}})(clientstream::HTTP.WebSockets.WebSocket{HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}})
│        @ Pluto ~/.julia/packages/Pluto/4cF9Y/src/webserver/WebServer.jl:182
│      [8] upgrade(f::Pluto.var"#358#370"{Pluto.ServerSession, Base.RefValue{Function}}, http::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}; binary::Bool)
│        @ HTTP.WebSockets ~/.julia/packages/HTTP/aTjcj/src/WebSockets.jl:160
│      [9] upgrade
│        @ ~/.julia/packages/HTTP/aTjcj/src/WebSockets.jl:142 [inlined]
│     [10] (::Pluto.var"#357#369"{Pluto.ServerSession, HTTP.Handlers.Router{Symbol("##341")}, Base.RefValue{Function}})(http::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}})
│        @ Pluto ~/.julia/packages/Pluto/4cF9Y/src/webserver/WebServer.jl:164
│     [11] handle
│        @ ~/.julia/packages/HTTP/aTjcj/src/Handlers.jl:270 [inlined]
│     [12] #4
│        @ ~/.julia/packages/HTTP/aTjcj/src/Handlers.jl:351 [inlined]
│     [13] macro expansion
│        @ ~/.julia/packages/HTTP/aTjcj/src/Servers.jl:415 [inlined]
│     [14] (::HTTP.Servers.var"#13#14"{HTTP.Handlers.var"#4#5"{HTTP.Handlers.StreamHandlerFunction{Pluto.var"#357#369"{Pluto.ServerSession, HTTP.Handlers.Router{Symbol("##341")}, Base.RefValue{Function}}}}, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}, HTTP.Servers.Server{Nothing, Sockets.TCPServer}, HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}})()
│        @ HTTP.Servers ./task.jl:482
â”” @ Pluto ~/.julia/packages/Pluto/4cF9Y/src/webserver/Dynamic.jl:338

BioTurboNick avatar Apr 12 '22 13:04 BioTurboNick

Thanks! Was it just this log message or did something stop working?

fonsp avatar Apr 19 '22 13:04 fonsp

Actually not sure. Something did break that I noticed later, but I don't know if this was the proximate cause. What happened was that the notebook stopped running (working indicators just churning with no CPU activity), even when I stopped the notebook process and started it again, and I noticed this message.

I may have been trying to use import Pkg; Pkg.update() instead of the built-in update function (which I forgot about), and restarting the notebook process when requested.

BioTurboNick avatar Apr 19 '22 15:04 BioTurboNick

I haven't seen anything like this in a while, so I'll close it.

BioTurboNick avatar Sep 30 '22 19:09 BioTurboNick