Hi,
this is quite weird, but I get the same result consistently in both computers which give trouble (let’s call them p1 and p2): the first plot command raises the ReadOnlyMemoryError, the second one makes the plot OK. But remember that the same libraries and versions give no trouble in the other computer, let’s call it o1 (the only thing that it is obviously different between these computers is that the one not giving any trouble has only one core, while the other two are multi-core computers).
using GR instead of PyPlot creates the plot OK in two of the computers (o1 and p1), but couldn’t try in p2, it ends up timing out when Pkg.add(“GR”). I tried the command several times and this one happens to be on the fastest network, and if I do a git clone of GR from outside julia it takes only seconds. In p1 Pkg.add(“GR”) also took quite much longer than the same in o1, despite being in the same network. I don’t see how these things could be related, but it looks like Julia has some serious issues in p1 and p2, despite having the same versions of everything.
Really puzzled… Any hints?
[angelv@kepa ~]$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.0 (2017-06-19 13:05 UTC)
_/ |\__'_|_|_|\__'_| |
|__/ | x86_64-pc-linux-gnu
julia> using PyPlot
julia> x=collect(0:0.01:2*pi);
julia> plot(x,sin.(x))
ERROR: PyError (ccall(@pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, arg, C_NULL)) <class 'RuntimeError'>
RuntimeError('Julia exception: ReadOnlyMemoryError()',)
File "/usr/lib/python3.6/site-packages/matplotlib/pyplot.py", line 3306, in plot
ax = gca()
File "/usr/lib/python3.6/site-packages/matplotlib/pyplot.py", line 950, in gca
return gcf().gca(**kwargs)
File "/usr/lib/python3.6/site-packages/matplotlib/pyplot.py", line 586, in gcf
return figure()
Stacktrace:
[1] pyerr_check at /home/angelv/.julia/v0.6/PyCall/src/exception.jl:56 [inlined]
[2] pyerr_check at /home/angelv/.julia/v0.6/PyCall/src/exception.jl:61 [inlined]
[3] macro expansion at /home/angelv/.julia/v0.6/PyCall/src/exception.jl:81 [inlined]
[4] #_pycall#67(::Array{Any,1}, ::Function, ::PyCall.PyObject, ::Array{Float64,1}, ::Vararg{Array{Float64,1},N} where N) at /home/angelv/.julia/v0.6/PyCall/src/PyCall.jl:653
[5] _pycall(::PyCall.PyObject, ::Array{Float64,1}, ::Vararg{Array{Float64,1},N} where N) at /home/angelv/.julia/v0.6/PyCall/src/PyCall.jl:641
[6] #pycall#71(::Array{Any,1}, ::Function, ::PyCall.PyObject, ::Type{PyCall.PyAny}, ::Array{Float64,1}, ::Vararg{Array{Float64,1},N} where N) at /home/angelv/.julia/v0.6/PyCall/src/PyCall.jl:675
[7] pycall(::PyCall.PyObject, ::Type{PyCall.PyAny}, ::Array{Float64,1}, ::Vararg{Array{Float64,1},N} where N) at /home/angelv/.julia/v0.6/PyCall/src/PyCall.jl:675
[8] #plot#85(::Array{Any,1}, ::Function, ::Array{Float64,1}, ::Vararg{Array{Float64,1},N} where N) at /home/angelv/.julia/v0.6/PyPlot/src/PyPlot.jl:172
[9] plot(::Array{Float64,1}, ::Vararg{Array{Float64,1},N} where N) at /home/angelv/.julia/v0.6/PyPlot/src/PyPlot.jl:169
[10] macro expansion at ./REPL.jl:97 [inlined]
[11] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73
julia> plot(x,sin.(x))
1-element Array{PyCall.PyObject,1}:
PyObject <matplotlib.lines.Line2D object at 0x7f87a83c7a58>
julia>