# VS Code 1.7.1.2 and Plots.jl not working

**URL:** <https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960>\
**Category:** VS Code\
**Created:** [September 29, 2022, 4:26am UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960 "2022-09-29T04:26:35Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![dleather](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dleather/32/43762_2.png) [@dleather](https://discourse.julialang.org/u/dleather)\
**Post date:** [September 29, 2022, 4:26am UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/1 "2022-09-29T04:26:35Z")

</div>

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.

Any ideas what could be the culprit?

---

<div class="post-metadata">

**Author:** ![marast](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@marast](https://discourse.julialang.org/u/marast)\
**Post date:** [September 29, 2022, 8:32am UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/2 "2022-09-29T08:32:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ultrapoci](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ultrapoci/32/25356_2.png) [@ultrapoci](https://discourse.julialang.org/u/ultrapoci)\
**Post date:** [September 29, 2022, 9:06am UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/3 "2022-09-29T09:06:28Z")

</div>

I’m getting

```julia
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

```julia
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

```

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [September 29, 2022, 9:44am UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/4 "2022-09-29T09:44:26Z")

</div>

> [@ultrapoci](#):
>
> adding the GR package, changed the error

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.

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [September 29, 2022, 12:00pm UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/5 "2022-09-29T12:00:28Z")

</div>

> <https://github.com/JuliaPlots/Plots.jl/issues/4375>
>
> Hi there, 
> 
> 1. I am unable to precompile Plots.jl on Windows-Julia 1.7.3 in a …new project environment with only Plots.jl installed.
> 
> \`\`\`
> Status \`XXXX\\projects\\TestProject\\Project.toml\`
> \[91a5bcdd\] Plots v1.34.1
> \`\`\`
> 
> Error Message when trying to use Plots.jl:
> 
> \`\`\`
> GKS: cairoplugin.dll: can't load library, error 126 (0x7e)
> ERROR: LoadError: SystemError: opening file "XXXX\\\\AppData\\\\Local\\\\Temp\\\\jl\_g5Ue4As5MP.png": No such file or directory
> Stacktrace:
> \[1\] systemerror(p::String, errno::Int32; extrainfo::Nothing)
> \`\`\`
> 
> I tried to solve this via \`Pkg.build("GR")\` from previous suggestions, but it did not help either.
> 
> 
> 2. Actually, I wanted to submit another issue for Plots \`v1.34.0\`, where the ylabel could no longer be chosen as a symbol, but the package was updated so fast I did not manage to submit. Would this work in Plots \`v1.34.1\`?:
> 
> \`\`\`
> using Plots
> plot(1,2; ylabel = :test)
> \`\`\`
> 
> Best regards, 
> Patrick

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [September 29, 2022, 12:04pm UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/6 "2022-09-29T12:04:44Z")

</div>

I’ve just tagged `Plots@1.34.4`: it will be out soon (\<10m) once [New version: Plots v1.34.4 by JuliaRegistrator · Pull Request #69200 · JuliaRegistries/General · GitHub](https://github.com/JuliaRegistries/General/pull/69200) is merged and it should fix `VSCode` for `Windows` users.

Please upgrade to `Plots@1.34.4` and ensure `GR@0.68` is in the manifest:

```julia
(@v1.8) pkg> status -m GR
⌃ [28b8d3ca] GR v0.68.0

```

---

<div class="post-metadata">

**Author:** ![marast](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@marast](https://discourse.julialang.org/u/marast)\
**Post date:** [September 29, 2022, 12:30pm UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/7 "2022-09-29T12:30:27Z")

</div>

Version 1.34.4 of Plots fixed this problem for me. Thank you!

---

<div class="post-metadata">

**Author:** ![dleather](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dleather/32/43762_2.png) [@dleather](https://discourse.julialang.org/u/dleather)\
**Post date:** [September 29, 2022, 6:17pm UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/8 "2022-09-29T18:17:24Z")

</div>

Ditto!

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [October 1, 2022, 8:45am UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/9 "2022-10-01T08:45:46Z")

</div>

`Plots@1.35.0` has just been released.

@jheinen has manually tested `vscode` on `windows` with `GR@0.69`, in addition to `CI` being ✔ for all `julia` versions and OSs.

This should be a transparent transition for all users, **especially on `windows`**.

In the (unlikely ?) case of failure, please report the issue asap.

---

<div class="post-metadata">

**Author:** ![vladgladkikh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vladgladkikh/32/24087_2.png) [@vladgladkikh](https://discourse.julialang.org/u/vladgladkikh)\
**Post date:** [November 3, 2022, 6:33am UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/10 "2022-11-03T06:33:06Z")

</div>

I have this issue since today. In Julia 1.8.1, 1.8.2, 1.6.7. Plots v1.35.7, GR v0.69.5 How to solve it?

---

<div class="post-metadata">

**Author:** ![vladgladkikh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vladgladkikh/32/24087_2.png) [@vladgladkikh](https://discourse.julialang.org/u/vladgladkikh)\
**Post date:** [November 3, 2022, 6:39am UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/11 "2022-11-03T06:39:16Z")

</div>

Solved it like this: [Plots v1.34.1 - Cannot Precompile in new project environment · Issue #4375 · JuliaPlots/Plots.jl · GitHub](https://github.com/JuliaPlots/Plots.jl/issues/4375#issuecomment-1260086074)

---

<div class="post-metadata">

**Author:** ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Post date:** [November 3, 2022, 10:57am UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/12 "2022-11-03T10:57:08Z")

</div>

I have the same problem with Plots v1.35.7.

---

<div class="post-metadata">

**Author:** ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Post date:** [November 3, 2022, 11:01am UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/13 "2022-11-03T11:01:39Z")

</div>

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
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

```

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [November 3, 2022, 11:03am UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/14 "2022-11-03T11:03:38Z")

</div>

[Plots.jl, GR.jl broken due to GR\_jll v0.69.1+1](https://discourse.julialang.org/t/plots-jl-gr-jl-broken-due-to-gr-jll-v0-69-1-1/89708).  
[GKS: svgplugin.dll: can't load library, error 126 (0x7e) · Issue #486 · jheinen/GR.jl · GitHub](https://github.com/jheinen/GR.jl/issues/486).

@mkitti, I was afraid of this, and I can’t afford to spend a whole day on this.

~~Should we release a new `GR.jl` with with `GR_jll` pinned now ?~~

EDIT: yanked `GR_jll` instead, `pkg> up` should solve the issue.

---

<div class="post-metadata">

**Author:** ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)\
**Post date:** [November 3, 2022, 5:12pm UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/15 "2022-11-03T17:12:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [November 3, 2022, 7:47pm UTC](https://discourse.julialang.org/t/vs-code-1-7-1-2-and-plots-jl-not-working/87960/16 "2022-11-03T19:47:36Z")

</div>

Please see my explanation here:

> <https://github.com/jheinen/GR.jl/issues/486#issuecomment-1302587583>
>
> After https://github.com/JuliaPackaging/Yggdrasil/pull/5784, I am encountering t…his issue on Windows with GR\_jll v0.69.1+1:
> 
> \`\`\`
> GKS: svgplugin.dll: can't load library, error 126 (0x7e)
> ERROR: SystemError: opening file "...\\\\jl\_ViZ8T6pmd8.svg": No such file or directory
> \`\`\`
> 
> I can resolve by one of the following. 
> 
> 1. Downgrading GR\_jll to v0.69.1+0
> \`\`\`
> \] add GR\_jll#fc933dae4a54c49707193e2dcc7df1e5ef201cab
> \`\`\`
> 
> 2.
> \`\`\`julia
> using GR\_JLL
> Libdl.dlopen(joinpath(dirname(GR.GRPreferences.GR\_jll.libGR\_path), "svgplugin"))
> \`\`\`
> 
> I'm adding the later to #483
