Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't plot on Juno using gr #2072

Closed
monilg96 opened this issue Jun 25, 2019 · 9 comments
Closed

Can't plot on Juno using gr #2072

monilg96 opened this issue Jun 25, 2019 · 9 comments
Labels

Comments

@monilg96
Copy link

Hi, I'm new with julia and I'm trying to plot inside the juno plot plane but I get the same error everytime. I'm trying to do just a basic plot:

using Plots
gr()
plot(1:10)

The error I'm getting is:

GKS: file open error (C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\GR\jmltz\src\..\deps\gr\FONTS\GKSFONT.DAT)
open: No such file or directory
GKS: file open error (C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\GR\jmltz\src\..\deps\gr\FONTS\GKSFONT.DAT)
open: No such file or directory
Error showing value of type Plots.Plot{Plots.GRBackend}:
ERROR: SystemError: opening file "C:\\Users\\MNICAL~1\\AppData\\Local\\Temp\\jl_6AF.tmp.png": No such file or directory
Stacktrace:
 [1] open at .\iostream.jl:281 [inlined]
 [2] #open#310(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::getfield(Base, Symbol("##274#275")){String}, ::String) at .\iostream.jl:373
 [3] open at .\iostream.jl:373 [inlined]
 [4] read at .\io.jl:297 [inlined]
 [5] _show(::IOContext{Base64.Base64EncodePipe}, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.GRBackend}) at C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\Plots\47Tik\src\backends\gr.jl:1378
 [6] _showjuno at C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\Plots\47Tik\src\output.jl:260 [inlined]
 [7] showjuno(::IOContext{Base64.Base64EncodePipe}, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.GRBackend}) at C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\Plots\47Tik\src\output.jl:244
 [8] show(::IOContext{Base64.Base64EncodePipe}, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.GRBackend}) at C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\Plots\47Tik\src\output.jl:195
 [9] #base64encode#3(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Function, ::Function, ::MIME{Symbol("image/png")}, ::Vararg{Any,N} where N) at C:\Users\julia\AppData\Local\Julia-1.1.1\share\julia\stdlib\v1.1\Base64\src\encode.jl:208
 [10] #base64encode at .\none:0 [inlined]
 [11] _binstringmime at C:\Users\julia\AppData\Local\Julia-1.1.1\share\julia\stdlib\v1.1\Base64\src\Base64.jl:41 [inlined]
 [12] #stringmime#6(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Function, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.GRBackend}) at C:\Users\julia\AppData\Local\Julia-1.1.1\share\julia\stdlib\v1.1\Base64\src\Base64.jl:38
 [13] (::getfield(Base64, Symbol("#kw##stringmime")))(::NamedTuple{(:context,),Tuple{IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}}}, ::typeof(Base64.stringmime), ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.GRBackend}) at .\none:0
 [14] #stringmime#7(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Function, ::String, ::Plots.Plot{Plots.GRBackend}) at C:\Users\julia\AppData\Local\Julia-1.1.1\share\julia\stdlib\v1.1\Base64\src\Base64.jl:39
 [15] #stringmime at .\none:0 [inlined]
 [16] displayinplotpane(::Plots.Plot{Plots.GRBackend}) at C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\Atom\E4PBh\src\display\showdisplay.jl:68
 [17] display(::Atom.JunoDisplay, ::Plots.Plot{Plots.GRBackend}) at C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\Atom\E4PBh\src\display\showdisplay.jl:102
 [18] display(::Any) at .\multimedia.jl:287
 [19] #invokelatest#1 at .\essentials.jl:742 [inlined]
 [20] invokelatest at .\essentials.jl:741 [inlined]
 [21] print_response(::IO, ::Any, ::Any, ::Bool, ::Bool, ::Any) at C:\Users\julia\AppData\Local\Julia-1.1.1\share\julia\stdlib\v1.1\REPL\src\REPL.jl:155
 [22] print_response(::REPL.AbstractREPL, ::Any, ::Any, ::Bool, ::Bool) at C:\Users\julia\AppData\Local\Julia-1.1.1\share\julia\stdlib\v1.1\REPL\src\REPL.jl:140
 [23] (::getfield(REPL, Symbol("#do_respond#38")){Bool,getfield(Atom, Symbol("##172#173")),REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at C:\Users\julia\AppData\Local\Julia-1.1.1\share\julia\stdlib\v1.1\REPL\src\REPL.jl:714
 [24] #invokelatest#1 at .\essentials.jl:742 [inlined]
 [25] invokelatest at .\essentials.jl:741 [inlined]
 [26] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at C:\Users\julia\AppData\Local\Julia-1.1.1\share\julia\stdlib\v1.1\REPL\src\LineEdit.jl:2273
 [27] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at C:\Users\julia\AppData\Local\Julia-1.1.1\share\julia\stdlib\v1.1\REPL\src\REPL.jl:1035
 [28] run_repl(::REPL.AbstractREPL, ::Any) at C:\Users\julia\AppData\Local\Julia-1.1.1\share\julia\stdlib\v1.1\REPL\src\REPL.jl:192
 [29] (::getfield(Base, Symbol("##734#736")){Bool,Bool,Bool,Bool})(::Module) at .\client.jl:362

Can anybody tell me if I'm doing something wrong?

@daschw
Copy link
Member

daschw commented Jun 26, 2019

Does it help, if you run

julia> ] # enter Pkg mode

pkg> build GR

in the REPL?

@monilg96
Copy link
Author

no @daschw , i still get the same error

@daschw
Copy link
Member

daschw commented Jun 26, 2019

Hm, maybe @jheinen can help.

@daschw daschw added the GR label Jun 26, 2019
@jheinen
Copy link
Member

jheinen commented Jun 26, 2019

Could you please check, whether the file C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\GR\jmltz\src\..\deps\gr\FONTS\GKSFONT.DAT really exists? If so, could you try to use Julia/GR in a Windows account without Unicode characters and/or blanks (Mónica Lara)?

@monilg96
Copy link
Author

I tried searching for that file but apparently no such file exists. There's one with lowercase but it is located in the deps folder inside jmltz instead of in src and I'm not sure if it's the same thing.

@jheinen
Copy link
Member

jheinen commented Jun 26, 2019

What is the value of using GR; ENV["GRDIR"]? Could you please try to build GR:

ENV["GRDIR"] = ""
] build GR

... probably after ] up

@monilg96
Copy link
Author

now I get this error

GKS: file open error (C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\GR\jmltz\src\..\deps\gr\FONTS\GKSFONT.DAT)
open: No such file or directory
ERROR: SystemError: opening file "C:\\Users\\MNICAL~1\\AppData\\Local\\Temp\\jl_D9C6.tmp.svg": No such file or directory
Stacktrace:
 [1] #systemerror#43(::Nothing, ::Function, ::String, ::Bool) at .\error.jl:134
 [2] systemerror at .\error.jl:134 [inlined]
 [3] #open#309(::Bool, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Function, ::String) at .\iostream.jl:289
 [4] #open at .\none:0 [inlined]
 [5] open(::String, ::String) at .\iostream.jl:345
 [6] _readfile(::String) at C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\GR\jmltz\src\GR.jl:3134
 [7] show() at C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\GR\jmltz\src\GR.jl:3182
 [8] plot_data(::Bool) at C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\GR\jmltz\src\jlgr.jl:1225
 [9] plot_data at C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\GR\jmltz\src\jlgr.jl:934 [inlined]
 [10] #plot#20(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::UnitRange{Int64}) at C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\GR\jmltz\src\jlgr.jl:1422
 [11] plot at C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\GR\jmltz\src\jlgr.jl:1414 [inlined]
 [12] #plot#2 at C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\GR\jmltz\src\GR.jl:3070 [inlined]
 [13] plot(::UnitRange{Int64}) at C:\Users\Mónica Lara\.juliapro\JuliaPro_v1.1.1.1\packages\GR\jmltz\src\GR.jl:3070
 [14] top-level scope at none:0

@Dilkhaz-tce
Copy link

after adding Plots Package to your environments build it (build Plots) in first time

@jheinen
Copy link
Member

jheinen commented Nov 14, 2020

Could you please try this.

@t-bltg t-bltg closed this as completed Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants