I have Julia 1.8.1 installed, and the August 2022 update (1.7.2) of VS Code; the latest at the time of writing.
Loading the REPL from the command line, the follow code works:
using Pkg; Pkg.add(“Plots”); using Plots; plot([1.0])
In the latest VS Code I get the following error:
GKS: svgplugin.dll: can’t load library, error 126 (0x7e)
Error showing value of type Plots.Plot{Plots.GRBackend}:
ERROR: SystemError: opening file “C:\Users\leather\AppData\Local\Tem\jl_qtCZMTaVsX.svg”: No such file or directory
I’ve deleted my ‘.julia’ directory and rebuilt the Plots.jl package to no avail.
Since yesterday I have the same problem. It has something to with the way vs code displays plots in its own plot plane. When I uncheck the “use plot plane” option in vscode for julia it works fine. However, I have no idea how to fix this.
GKS: svgplugin.dll: can't load library, error 126 (0x7e)
Error showing value of type Plots.Plot{Plots.GRBackend}:
SYSTEM (REPL): showing an error caused an error
SYSTEM (REPL): caught exception of type ErrorException while trying to handle a nested exception; giving up
while trying to plot while using the REPL in VSCode. I’m using Julia v1.8.1 and Plots v1.34.3.
Note that plotting using the REPL outside VSCode works fine.
Edit: adding the GR package, changed the error to
Error showing value of type Plots.Plot{Plots.GRBackend}:
ERROR: SystemError: opening file "C:\\Users\\Niky\\AppData\\Local\\Temp\\jl_sH8pMPANER.svg": No such file or directory
Plots.jl already has GR.jl as a dependency, so you shouldn’t need to add it. I guess that could be a clue. I would first confirm Julia 1.8.1 works in the REPL, as it does for me. I’m not on Windows in case it’s a Windows problem, but I suspect a simple PATH problem in VS Code, or it using an older Julia version or something.
I also have the problem in a temporary environment with only Plots v1.34.4 loaded. GR v0.68.0 is in the manifest. The Julia version is 1.8.1, Everything worked fine until yesterday. Other backends I tried like PlotlyJS and PyPlot did not have this problem.
julia> Plots.plot([1,2,3])
Error showing value of type Plots.Plot{Plots.GRBackend}:
ERROR: SystemError: opening file "C:\\Users\\fsald\\AppData\\Local\\Temp\\jl_uBahyN6ZOd.svg": No such file or directory
In the next version of the GR run-time you may enable debug output (using GR_DEBUG and/or GKS_DEBUG environment variables). Hopefully, we can then find the cause of the problem(s).
@mkitti : Thanks again for your contributions. I still have the impression that the cause of the problems described here is I/O related.