stefan-m-lenz / JuliaConnectoR

A functionally oriented interface for calling Julia from R
Other
102 stars 6 forks source link

Could not find file in Win10 #8

Closed Alexispap closed 3 years ago

Alexispap commented 3 years ago

Hello! If i want to call JuliaCall("include", file.path(getwd(),'myjuliafile.jl') on a windows machine in RStudio, i get the following error:

Starting Julia ... ERROR: SystemError: opening file "\ad\home\xyz\Dokumente\R\win-library\4.0\JuliaConnectoR\Julia\main.jl": No such file or directory Stacktrace: [1] systemerror(p::String, errno::Int32; extrainfo::Nothing) @ Base .\error.jl:168 [2] #systemerror#62 @ .\error.jl:167 [inlined] [3] systemerror @ .\error.jl:167 [inlined] [4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing) @ Base .\iostream.jl:293 [5] open @ .\iostream.jl:282 [inlined] [6] open(f::Base.var"#326#327"{String}, args::String; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ Base .\io.jl:328 [7] open @ .\io.jl:328 [inlined] [8] read @ .\io.jl:434 [inlined] [9] _include(mapexpr::Function, mod::Module, _path::String) @ Base .\loading.jl:1144 [10] include(mod::Module, _path::String) @ Base .\Base.jl:386 [11] exec_options(opts::Base.JLOptions) @ Base .\client.jl:285 [12] _start() @ Base .\client.jl:485Fehler in runJuliaServer() : Timeout while waiting for response from Julia server

stefan-m-lenz commented 3 years ago

Thanks for reporting the error. I could not reproduce it on my Windows computer. Does this error occur specifically when calling include? Does it happen reliably? What happens if you simply execute juliaEval("1+1")? It seems that you have installed the R package on a network drive. Could it simply be that the network connection was interrupted? Could you tell me how you mounted this network drive in Windows so that I can further try to reproduce it? It seems the drive is not connected to a drive letter. Have you modified the R library path? Can you show the output of .libPaths() in R?

Alexispap commented 3 years ago

It also happens when i execute JuliaEval("1+1") and it happens reliably, yes. The output of .libPaths() is "\\ad/home/xyz/Dokumente/R/win-library/4.0" "C:/Program Files/R/R-4.0.5/library"
I am not sure how the network is mounted, since it was our administrator who did it, but i suspect that you are right with the assumption that the problem can be found here.

stefan-m-lenz commented 3 years ago

Thanks for the info. I will try to reproduce it with a similar library path.

Alexispap commented 3 years ago

We resolved it now by changing the library path to the direct path with the letter! Thanks for your fast and helpful response :)

stefan-m-lenz commented 3 years ago

Great to hear! I have now tried it again. I think the library path was not entirely correct before. For me it worked with 4 \ at the beginning:

My library path:

> .libPaths()
[1]  "\\\\samba.xxx/yyy/R/win-library/3.5" "C:/Program Files/R/R-3.5.3/library"

You had ony two \ at the beginning and I assume that led to the problem. As your problem is resolved, I'll close the issue now.