Vega and the Iris Dataset

I am trying to execute the following script on Julia 1.6.0

#select packages
using VegaDatasets
using DataVoyager
using VegaLite

# load dataset
data = dataset("iris")
#display data

and I get the following errors:

ERROR: IOError: could not spawn `'C:\Users\XXXXXX.julia\artifacts\3cac82ef60c809398a5dd6870b5e97d42dbe2df1\electron.exe' 'C:\Users\XXXXXX\.julia\packages\Electron\MNI24\src\main.js' '\\.\pipe\jlel-1679e780940411eb2fbe936444e73c49' '\\.\pipe\jlel-sn-1679e780940411eb3dbed7efcd7742b0' fAtUy2/31ptaTj7kAEbd9zTmdBtzJrjAAijYgCaeS/Qd9sT3E3b8B1VfKC8qwaqIul6BTzShj9BxAHYEGkeV8G4oh+YE1ljPhNRZPgHUw4g39ez4BwVcT4wHwy13O5I5jVF4XOqcjRsLrJLMvHR0Fu4h7XQuJXjU0t42V//37UQ=`: permission denied (EACCES)
 [1] _spawn_primitive(file::String, cmd::Cmd, stdio::Vector{Any})
   @ Base .\process.jl:99
 [2] #637
   @ .\process.jl:112 [inlined]
 [3] setup_stdios(f::Base.var"#637#638"{Cmd}, stdios::Vector{Any})
   @ Base .\process.jl:196
 [4] _spawn
   @ .\process.jl:111 [inlined]
 [5] open(cmds::Cmd, stdio::Base.TTY; write::Bool, read::Bool)
   @ Base .\process.jl:374
 [6] open(cmds::Cmd, mode::String, stdio::Base.TTY)
   @ Base .\process.jl:343
 [7] Electron.Application()
   @ Electron ~\.julia\packages\Electron\MNI24\src\Electron.jl:148
 [8] Voyager()
   @ DataVoyager ~\.julia\packages\DataVoyager\71yWt\src\DataVoyager.jl:20
 [9] top-level scope

OS: Windows 10 Enterprise

Any pointers on how to solve it are welcome.

I tried the same sort of thing with Juan Klapper’s Youtube video of Vegalite on a Pluto session, and for:

	using VegaDatasets, VegaLite
	using Random, Distributions, DataFrames

	Independent=0:0.1:9.9 #Using a Unitrange object
	dependent=Independent .+ randn(length(Independent));

	x = Independent,
	y = dependent

in three cells, the plot is not displayed; the error is

Failed to show value:

IOError: could not spawn setenv(`'C:\Users\XXXXXX\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node.exe' 'C:\Users\XXXXXX\.julia\artifacts\b80366d79f4eb178efd93d258a6fbf021cd0ee9f\vl2vg.js'`; dir="C:\\Users\\kumar\\.julia\\artifacts\\b80366d79f4eb178efd93d258a6fbf021cd0ee9f"): permission denied (EACCES)

_spawn_primitive(::String, ::Cmd, ::Vector{Any})@process.jl:99
_spawn(::Cmd, ::Vector{Any}, ::Base.ProcessChain)@process.jl:181
_spawn(::Base.OrCmds, ::Vector{Any}, ::Base.ProcessChain)@process.jl:149
setup_stdios(::Base.var"#639#640"{Base.OrCmds}, ::Vector{Any})@process.jl:196
var"#open#646"(::Bool, ::Bool, ::typeof(open), ::Base.OrCmds, ::Base.DevNull)@process.jl:365
open(::Base.OrCmds, ::String, ::Base.DevNull)@process.jl:339
show(::IOContext{IOBuffer}, ::MIME{Symbol("image/svg+xml")}, ::VegaLite.VLSpec)@show.jl:63
show_richest(::IOContext{IOBuffer}, ::Any)@PlutoRunner.jl:620
var"#sprint_withreturned#28"(::IOContext{Base.DevNull}, ::Int64, ::typeof(Main.PlutoRunner.sprint_withreturned), ::Function, ::VegaLite.VLSpec)@PlutoRunner.jl:568
format_output_default(::Any, ::Any)@PlutoRunner.jl:492
formatted_result_of(::Base.UUID, ::Bool, ::Nothing)@PlutoRunner.jl:425
top-level scope@none:1

Julia 1.6 on Windows has a breaking change how it handles artifacts that broke NodeJS.jl and every single package that depends on that… I’m trying to work around that now, hopefully it will be fixed soon.

1 Like

@davidanthoff , Thanks. I got Vegalite to behave on VS Code, but it is broken on Pluto. And DataVoyager is broken on VS Code. So, stuff still works, but I’ll keep a lookout for a fix. Do you have a error tracker that I can follow?

That all makes sense: when you use VegaLite.jl inside VS Code it doesn’t need the NodeJS functionality. DataVoyager.jl depends on Electron.jl, and that was also broken by the change in artifacts in Julia 1.6…

At this point I’ve tagged new versions of NodeJS and Electron, and so it might all work again if you update things. I don’t have time today to test all the downstream packages, but fingers crossed it might all be ok now.

1 Like

I tried a package update. Still cannot spawn electron from VS Code. Do I need to update a particular tag out of the mainstream?

Could you post the version of NodeJS.jl that is in your environment?

It is 1.1.2
Should I do
Pkg.add NodeJS@1.1.3 instead?

Tried and seems like 1.1.2 is the latest.

No, 1.1.2 is the latest version… Hm… Could you try and look what permissions in Windows the file C:\Users\XXXXXX\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node.exe has on your system?

Full control for myself, system and Administrators. But the properties shows folder is read-only.

Ah, I know what was going on! Just tagged a new DataVoyager version, can you update and try again?


Works now in VS Code. Thanks much./K

Update: Also in Pluto.

1 Like