Hi all,
I’m getting the following issue when attempting to use savefig()
with the Plots.jl
package and plotlyjs()
backend (note, Julia v0.5.0, Plots.jl v0.10.3, PlotlyJS.jl v0.5.2, Blink v0.5.1, on Ubuntu 16.04) . Oddly enough, I am able to successfully save a plot to .png, but the REPL pauses during the save operation with the below text. If I hit enter, I get back to a new line in the REPL and the plot has saved. So from a user perspective, the only issue is that I can’t set something to run and save plots while I move away from the keyboard, since I’ll need to hit enter every time a new plot is saved. So, I open Julia at the REPL and run the following commands:
julia> using Plots
julia> plotlyjs()
Plots.PlotlyJSBackend()
julia> p = plot(randn(10));
julia> savefig(p, “/home/colin/Temp/myplot.png”)
The following text is displayed the first time I run savefig
(as above):
WARNING: bytestring(s::AbstractString…) is deprecated, use string(s…) instead.
WARNING: the no-optranspose
fallback is deprecated, and no more specifictranspose
method for ArgumentError exists. Considerpermutedims(x, [2, 1])
or writing a specifictranspose(x::ArgumentError)
method if appropriate. in
depwarn in (depwarn::(String, ::String, ::Symbol)::Symbol) at ./deprecated.jl:64
at in ./deprecated.jlbytestring:(64
:: in Stringtranspose)( at ./deprecated.jl:50
:: in ArgumentErrorhandle_new_from_data)( at ./deprecated.jl:770
:: in Stringws_handler, (::Gtk.GLib.GError)::Dict{Any,Any}) at /home/colin/.julia/v0.5/Rsvg/src/calls.jl:61
at in /home/colin/.julia/v0.5/Blink/src/content/server.jlhandle_new_from_data:(45
:: in Stringsplitquery)( at /home/colin/.julia/v0.5/Rsvg/src/calls.jl:69
:: in Blink#savefig#175.(#ws_handler, ::Symbol, ::Dict{Any,Any})::Function, at /home/colin/.julia/v0.5/Mux/src/basics.jl:28
:: in PlotlyJSwcatch.(SyncPlot{PlotlyJS.ElectronDisplay}, ::Mux.##1#2{Mux.#splitquery,Blink.#ws_handler}, ::String)::Dict{Any,Any}) at /home/colin/.julia/v0.5/PlotlyJS/src/savefig.jl:164
at in /home/colin/.julia/v0.5/Mux/src/websockets_integration.jlsavefig:(12
:: in PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}, (::Mux.##1#2{Mux.##3#4{Mux.##3#4{Mux.#todict,Mux.#wcatch},Mux.#splitquery},Blink.#ws_handler})(::String)::Tuple{HttpCommon.Request,WebSockets.WebSocket}) at /home/colin/.julia/v0.5/PlotlyJS/src/savefig.jl:106
at in /home/colin/.julia/v0.5/Mux/src/Mux.jlplotlyjs_save_hack:10
at in /home/colin/.julia/v0.5/Plots/src/backends/plotlyjs.jl:98 [inlined](::
Mux in ._show##13#14{Mux.App})( at /home/colin/.julia/v0.5/Plots/src/backends/plotlyjs.jl:101 [inlined]::
HttpCommon in .showRequest(, ::IOStream, ::WebSockets.WebSocket)::MIME{Symbol(“image/png”)}, at /home/colin/.julia/v0.5/Mux/src/server.jl:38
:: in Plotshandle.(Plot{Plots.PlotlyJSBackend})::WebSockets.WebSocketHandler, at /home/colin/.julia/v0.5/Plots/src/output.jl:197
:: in HttpCommonpng.(Request, ::Plots.Plot{Plots.PlotlyJSBackend}, ::HttpServer.Client{TCPSocket})::String) at /home/colin/.julia/v0.5/WebSockets/src/WebSockets.jl:382
at in /home/colin/.julia/v0.5/Plots/src/output.jl:8
(:: in HttpServersavefig.(#on_message_complete#18{HttpServer.Server,HttpServer.Client{TCPSocket},Bool})(::Plots.Plot{Plots.PlotlyJSBackend}, ::HttpCommon.Request)::String) at /home/colin/.julia/v0.5/HttpServer/src/HttpServer.jl:420
at in /home/colin/.julia/v0.5/Plots/src/output.jlon_message_complete:(116
:: in Ptreval{(HttpParser.Parser})::Module, at /home/colin/.julia/v0.5/HttpServer/src/RequestParser.jl:113
:: in Anyhttp_parser_execute)( at ./boot.jl:234
:: in HttpParsereval_user_input.(Parser, ::Any, ::HttpParser.ParserSettings, ::Base.REPL.REPLBackend)::Array{UInt8,1}) at ./REPL.jl:64
at in /home/colin/.julia/v0.5/HttpParser/src/HttpParser.jlmacro expansion:115
at in ./REPL.jlprocess_client:(95 [inlined]::
HttpServer in .Server, (::Base.REPL.##3#4{Base.REPL.REPLBackend})(::)HttpServer.Client{TCPSocket}, at ./event.jl:68
while loading no file, in expression starting on line 0::
Bool)
julia> 389
in (::HttpServer.##8#10{HttpServer.Server,Bool})() at ./task.jl:360
while loading no file, in expression starting on line 0
Error handling websocket connection:
MethodError: no method matching *(::ArgumentError, ::Blink.#msg)
Closest candidates are:
*(::Any, ::Any, ::Any, ::Any…) at operators.jl:138
Any subsequent calls to savefig
will pause, but with the (greatly reduced) following text:
julia> no method matching *(::ArgumentError, ::Blink.#msg)
Closest candidates are:
*(::Any, ::Any, ::Any, ::Any…) at operators.jl:138
and, as with the first call, I can just hit enter and then get returned to a new line in the console and the plot has successfully saved.
Does anyone have any ideas about how I can resolve this? Even information on whether this a problem specific to my installation, or something affecting multiple users would be helpful.
Thanks in advance.
Colin