GR.jl icon indicating copy to clipboard operation
GR.jl copied to clipboard

GKS: file open error ; can't open SVG file

Open lvyuemeng opened this issue 1 year ago • 10 comments

OS: windows 11 VSCode version: 1.90.1 In vscode repl using Plots:

GKS: file open error (C:\Users\吕粤蒙\AppData\Local\Temp\jl_ixshsrUJIN.svg) open: No such file or directory GKS: can't open SVG file open: No such file or directory

the problem still occur if using plot in powershell the output disappears with GR.inline("png"), but the problem still occurs.

lvyuemeng avatar Jun 25 '24 10:06 lvyuemeng

the problem seems related to the non-UTF-8 username, when I change the environment $env:JULIA_DEPOT_PATH = 'C:\.julia;' and again plot using powershell, it works. but this problem doesn't occur in previous version of julia.

lvyuemeng avatar Jun 25 '24 10:06 lvyuemeng

According to this path, the setting for your home directory seems to be wrong: C:\Users%username%\AppData\Local\Temp\jl_ixshsrUJIN.svg. We do not use the %username% substitution at any point, so the problem is probably in the VSCode configuration.

jheinen avatar Jun 25 '24 10:06 jheinen

According to this path, the setting for your home directory seems to be wrong: C:\Users%username%\AppData\Local\Temp\jl_ixshsrUJIN.svg. We do not use the %username% substitution at any point, so the problem is probably in the VSCode configuration.

the %username% is actually 吕粤蒙 which is non-UTF-8. so I guess this is the problem.

│ open: No such file or directory │ open: No such file or directory │ GKS: file open error (C:\Users\������\AppData\Local\Temp\jl_z2H8JYNovO.pdf) │ GKS: file open error (C:\Users\������\AppData\Local\Temp\jl_vcVYNIn8hQ.svg) │ GKS: can't open SVG file

lvyuemeng avatar Jun 25 '24 10:06 lvyuemeng

GR does not support non-UTF-8 file names - you could probably change the path for temporary files using the TEMP or TMP variables.

jheinen avatar Jun 25 '24 10:06 jheinen

GR does not support non-UTF-8 file names - you could probably change the path for temporary files using the TEMP or TMP variables.

Does the julia extension setting: "Plots path" help? I try to add a new path but it seems doesn't work, or should I change the TEMP as you said?

lvyuemeng avatar Jun 25 '24 14:06 lvyuemeng

I don't know the Plots.jl Plots paths setting. However, I suspect that a "forced" path for temporary files (TEMP or TMP) should help.

jheinen avatar Jun 25 '24 14:06 jheinen

I don't know the Plots.jl Plots paths setting. However, I suspect that a "forced" path for temporary files (TEMP or TMP) should help.

I mean the vscode julia extension setting: Plots path, anyway changing the path of TEMP really helps! Thanks!

lvyuemeng avatar Jun 25 '24 14:06 lvyuemeng

That's good news. If we can help on GR side, let me know. At the moment, however, I don't know how.

jheinen avatar Jun 25 '24 15:06 jheinen

the %username% is actually 吕粤蒙 which is non-UTF-8. so I guess this is the problem.

Only for our understanding: So the symbols "吕粤蒙" are not part of the Unicode character set? I ask, because UTF-8 can encode every Unicode character, so a non-UTF-8 character cannot be inside Unicode. So how is this supported by Windows then?

IngoMeyer441 avatar Jun 28 '24 12:06 IngoMeyer441

the %username% is actually 吕粤蒙 which is non-UTF-8. so I guess this is the problem.

Only for our understanding: So the symbols "吕粤蒙" are not part of the Unicode character set? I ask, because UTF-8 can encode every Unicode character, so a non-UTF-8 character cannot be inside Unicode. So how is this supported by Windoes then?

It should be Non-ASCII characters, sorry for my misrepresentation.

lvyuemeng avatar Jul 03 '24 08:07 lvyuemeng