queryverse / ElectronDisplay.jl

An Electron.jl based figure and table display.
Other
85 stars 17 forks source link

Error when using ElectronDisplay's Table display #93

Open realkrantz opened 2 years ago

realkrantz commented 2 years ago

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));
electrondisplay(df)

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)
Stacktrace:
  [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

Please help

lawless-m commented 2 years ago

While I did not preproduce the same error, when I tried the second example, all I got was a blank window.

julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
  [a93c6f00] + DataFrames v1.3.2
  [d872a56f] + ElectronDisplay v1.0.1
  [0ae4a718] + VegaDatasets v2.1.1
  [112f6efa] + VegaLite v2.6.0
lawless-m commented 2 years ago

it turned out to be that running the second command required Administrator privs to create the named Pipe.

Although perhaps a more fine grained solution would work