Hi,
I’m trying to use IJulia+PyPlot in Julia 1.0.
From REPL, I’m able to plot. however if I use IJulia notebook and try
plot( cumsum(rand(100)) )
,
the following error is coming.
PyError ($(Expr(:escape, :(ccall(#= /home/vish/.julia/packages/PyCall/fiJ3o/src/PyCall.jl:709 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, arg, C_NULL))))) <type 'exceptions.RuntimeError'>
RuntimeError('Julia exception: MethodError(iterate, (PyCall.PyDict{Symbol,PyCall.PyObject,true}(),), 0x00000000000061c1)',)
File "PyCall", line 1, in <lambda>
Stacktrace:
[1] pyerr_check at /home/vish/.julia/packages/PyCall/fiJ3o/src/exception.jl:60 [inlined]
[2] pyerr_check at /home/vish/.julia/packages/PyCall/fiJ3o/src/exception.jl:64 [inlined]
[3] macro expansion at /home/vish/.julia/packages/PyCall/fiJ3o/src/exception.jl:81 [inlined]
[4] macro expansion at /home/vish/.julia/packages/PyCall/fiJ3o/src/exception.jl:82 [inlined]
[5] #_pycall#82(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::PyCall.PyObject, ::PyCall.PyObject, ::Vararg{PyCall.PyObject,N} where N) at /home/vish/.julia/packages/PyCall/fiJ3o/src/PyCall.jl:701
[6] Type at /home/vish/.julia/packages/PyCall/fiJ3o/src/PyCall.jl:697 [inlined]
[7] map at ./tuple.jl:162 [inlined]
[8] #_pycall#82(::Base.Iterators.Pairs{Symbol,String,Tuple{Symbol,Symbol},NamedTuple{(:format, :bbox_inches),Tuple{String,String}}}, ::Function, ::PyCall.PyObject, ::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}) at /home/vish/.julia/packages/PyCall/fiJ3o/src/PyCall.jl:697
[9] #_pycall at ./none:0 [inlined]
[10] #pycall#86 at /home/vish/.julia/packages/PyCall/fiJ3o/src/PyCall.jl:731 [inlined]
[11] #pycall at ./none:0 [inlined]
[12] #call#87 at /home/vish/.julia/packages/PyCall/fiJ3o/src/PyCall.jl:734 [inlined]
[13] PyObject at ./none:0 [inlined]
[14] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol("image/svg+xml")}, ::Figure) at /home/vish/.julia/packages/PyPlot/jXCXB/src/PyPlot.jl:78
[15] limitstringmime at /home/vish/.julia/packages/IJulia/9RcVi/src/inline.jl:36 [inlined]
[16] display_dict(::Figure) at /home/vish/.julia/packages/IJulia/9RcVi/src/execute_request.jl:38
[17] display(::IJulia.InlineDisplay, ::Figure) at /home/vish/.julia/packages/IJulia/9RcVi/src/inline.jl:88
[18] display(::Figure) at ./multimedia.jl:287
[19] display_figs() at /home/vish/.julia/packages/PyPlot/jXCXB/src/PyPlot.jl:114
[20] #invokelatest#1 at ./essentials.jl:686 [inlined]
[21] invokelatest at ./essentials.jl:685 [inlined]
[22] execute_request(::ZMQ.Socket, ::IJulia.Msg) at /home/vish/.julia/packages/IJulia/9RcVi/src/execute_request.jl:194
[23] #invokelatest#1 at ./essentials.jl:686 [inlined]
[24] invokelatest at ./essentials.jl:685 [inlined]
[25] eventloop(::ZMQ.Socket) at /home/vish/.julia/packages/IJulia/9RcVi/src/eventloop.jl:8
[26] (::getfield(IJulia, Symbol("##15#18")))() at ./task.jl:259
Any ideas why this is happening?
With Thanks,
v-i-s-h