Hi guys,
I’m using VScode + julia extensions. Normally, when I apply ⇧(shift)+enter on a line of code in a .jl file, it will automatically open a julia REPL. However, today when I do the same thing, it reports an warning: Cannot read property ‘file’ of undefined on the bottom right corner of the screen and nothing happens.
I have no idea what I did to cause this problem. How can I fix it?
2 Likes
Can you add a screenshot ? Also, does this persist after closing and re-opening VSCode?
I am having same problem.Here is the screenshot.
1 Like
What do you have under Julia: Executable Path in the settings (Settings → Extensions → Julia)?
I had this issue previously because I had an invalid path there.
This is the screenshot. Yes, it persist after closing and re-opening VSCode.
Problem solved by changing the Executable Path from “/home/software/julia-1.6.4/bin” to “/home/software/julia-1.6.4/bin/julia”
Thank you!
7 Likes
On Windows, adding the .exe solved it for me
1 Like
Hello all, I had a hard time solving the same problem. The difference from @Sharon-Liang 's is that I am running VS code from a workstation and do “Remote-SSH Connect to Host…” to connect to another remoter server. VS code and Julia can run well with ⇧(shift)+enter at local workstation. But it doesn’t work for the remote server where I have to run include(“test.jl”) to run the code.
In both case, it is blank in Julia: Executable Path in the settings (Settings → Extensions → Julia). And even if I entered /alt/applic/user-maint/sc2350/julia-1.7.2/bin/julia to the server setting, it doesn’t help.
The /alt/applic/user-maint/sc2350/julia-1.7.2/bin/julia is actually the path for local workstation. In the server, I need to do “module load” to load julia/1.7.2.
Thank you for your help! @logankilpatrick @hdavid16
You choud use:
whereis julia
to find its location, and fill it in the Julia:Executable Path.
For example, the Executable Path of Julia in my remote server is “/cm/shared/apps/julia-1.7.1/bin/julia”.
Hope it helps
[
Shuang(Sharon)-Liang
Institute of Physics, CAS
sliang@iphy.ac.cn
](头像签名)
---- Replied Message ----
From | Si Chen via JuliaLangnotifications@julialang.discoursemail.com |
| Si_Chen
June 30 |
Hello all, I had a hard time solving the same problem. The difference from @Sharon-Liang 's is that I am running VS code from a workstation and do “Remote-SSH Connect to Host…” to connect to another remoter server. VS code and Julia can run well with ⇧(shift)+enter at local workstation. But it doesn’t work for the remote server where I have to run include(“test.jl”) to run the code.
In both case, it is blank in Julia: Executable Path in the settings (Settings → Extensions → Julia). And even if I entered /alt/applic/user-maint/sc2350/julia-1.7.2/bin/julia to the server setting, it doesn’t help.
The /alt/applic/user-maint/sc2350/julia-1.7.2/bin/julia is actually the path for local workstation. In the server, I need to do “module load” to load julia/1.7.2.
Thank you for your help! @logankilpatrick @hdavid16
2 Likes
Thank you @Sharon-Liang for your help! whereis julia
is working great to solve my problem!
Best,
Si
1 Like