How to solve ERROR: IOError: could not spawn Electron?

#This works:

using VegaLite, VegaDatasets, ElectronDisplay
dataset("cars") |> @vlplot(:point, x=:Acceleration, y=:Miles_per_Gallon, color=:Origin)

#But this does not work:

using DataFrames, ElectronDisplay
df = DataFrame(a=rand(100), b=rand(100), c=rand(100));

#Error message:

ERROR: IOError: could not spawn `'C:\Users\r\.julia\artifacts\3cac82ef60c809398a5dd6870b5e97d42dbe2df1\electron.exe' 'C:\Users\r\.julia\packages\Electron\MNI24\src\main.js' '\\.\pipe\jlel-88a3f3329fd111ec1de2a72f45dcc516' '\\.\pipe\jlel-sn-88a3f3329fd111ec3dcdf56143e24f1e' FbiW//KhtfNoKJwMMMjQ1QT3996X+tbePmBBVIsgmxL+sYE71JWYTzuTiz6BPM3CZ9FkzEqyjh7YcK5mmK5la0Adk6D+kLdGIqPTS0PCJIqmHCImuW4LPXibL13R/pweoh2IsMkGHI/X/SmFlFPiM7bVF0y1c8s0WtJAmAhuKfE=`: permission denied (EACCES)
  [1] _spawn_primitive(file::String, cmd::Cmd, stdio::Vector{Any})
    @ Base .\process.jl:100
  [2] #690
    @ .\process.jl:113 [inlined]
  [3] setup_stdios(f::Base.var"#690#691"{Cmd}, stdios::Vector{Any})
    @ Base .\process.jl:197
  [4] _spawn
    @ .\process.jl:112 [inlined]
  [5] open(cmds::Cmd, stdio::Base.TTY; write::Bool, read::Bool)
    @ Base .\process.jl:375
  [6] open(cmds::Cmd, mode::String, stdio::Base.TTY)
    @ Base .\pro	
  [7] Application()
    @ Electron C:\Users\r\.julia\packages\Electron\MNI24\src\Electron.jl:148
  [8] default_application
    @ C:\Users\r\.julia\packages\Electron\MNI24\src\Electron.jl:96 [inlined]
  [9] Window(args::URI; kwargs::Base.Pairs{Symbol, Dict{String, Dict{String, Bool}}, Tuple{Symbol}, NamedTuple{(:options,), Tuple{Dict{String, Dict{String, Bool}}}}})
    @ Electron C:\Users\r\.julia\packages\Electron\MNI24\src\Electron.jl:372
 [10] _getglobalwindow()
    @ ElectronDisplay C:\Users\r\.julia\packages\ElectronDisplay\efZyl\src\ElectronDisplay.jl:67
 [11] displayhtml(d::ElectronDisplay.ElectronDisplayType, payload::String; options::Dict{String, Dict{String, Bool}})
    @ ElectronDisplay C:\Users\r\.julia\packages\ElectronDisplay\efZyl\src\ElectronDisplay.jl:76
 [12] display(d::ElectronDisplay.ElectronDisplayType, #unused#::MIME{Symbol("application/vnd.dataresource+json")}, x::ElectronDisplay.DataresourceTableTraitsWrapper{DataFrame})
    @ ElectronDisplay C:\Users\r\.julia\packages\ElectronDisplay\efZyl\src\ElectronDisplay.jl:251
 [13] display(d::ElectronDisplay.ElectronDisplayType, mime::String, x::Any)
    @ Base.Multimedia .\multimedia.jl:216
 [14] display(d::ElectronDisplay.ElectronDisplayType, x::ElectronDisplay.DataresourceTableTraitsWrapper{DataFrame})
    @ ElectronDisplay C:\Users\r\.julia\packages\ElectronDisplay\efZyl\src\ElectronDisplay.jl:271
 [15] #electrondisplay#6
    @ C:\Users\r\.julia\packages\ElectronDisplay\efZyl\src\ElectronDisplay.jl:323 [inlined]
 [16] electrondisplay(x::DataFrame)
    @ ElectronDisplay C:\Users\r\.julia\packages\ElectronDisplay\efZyl\src\ElectronDisplay.jl:318
 [17] top-level scope
    @ REPL[73]:1

Also posted here. Someone else asked this elsewhere before (no solution posted there). Thanks.

The first one worked for me, but the DataFrame example didn’t produce anything.

The spawn worked for me, so I cannot offer much insight. I am in the Administrator’s group but I did not run it as Administator.

When I tried it (as you will see in GitHub), all I got was a blank window.

(it can also be noted that the first example doesn’t require ElectronDisplay

julia> using VegaLite, VegaDatasets
julia> dataset("cars") |> @vlplot(:point, x=:Acceleration, y=:Miles_per_Gallon, color=:Origin)

, it will open in your default Browser)

1 Like

Indeed the first part does not require ElectronDisplay. But for me the part that requires ElectronDisplay is not working (it keeps saying " ERROR: IOError: could not spawn Electron").

using DataFrames, ElectronDisplay
df = DataFrame(a=rand(100), b=rand(100), c=rand(100));

Seems you’re getting a permission denied error - are you allowed to run executables from that directory?

Ideally I should have that permission, and I am able to run other julia programs (eg. CmdStan). But just in case I am missing something, how can I make sure that I always have the permission to run executables from the directory (I am using julia REPL in vscode)?

From my other searches, I think it is the named pipe which is generating the EACCES

1 Like

But I do not use pipe in the second part, right? And the error appears even when I only try the second part (without first running the first part which has pipe) in a fresh julia environment.

The stacktrace includes this


which is a Windows named Pipe path

1 Like

And how could I solve that issue?

I don’t know. My PC is lcoked down by my Corporate Masters so I can’t fiddle with it.

Other people with a similar problem, many years ago, have suggested turning off the Windows Firewall

Others suggest running as Administrator

Which might be why it works for me - I can’t turn off Admin for myself to try it, I won’t be able to turn it back on again

1 Like

This works. Thanks.

1 Like