Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: LoadError: Cannot find Electron. #172

Closed
gtollefson opened this issue Feb 2, 2018 · 15 comments
Closed

ERROR: LoadError: Cannot find Electron. #172

gtollefson opened this issue Feb 2, 2018 · 15 comments

Comments

@gtollefson
Copy link

Hi,

After updating all of my julia packages, including PlotlyJS.jl and plots.jl, I receive the following error when running: PlotlyJS.savefig(graphic_group1, "R_project_group1.pdf")

I have tried Blink.AtomShell.install() of course and have also tried Pkg.update("PlotlyJS") and Pkg.checkout("PlotlyJS"). I'm using this for a project I'm presenting later today so any help would be very appreciated!

ERROR: LoadError: Cannot find Electron. Try Blink.AtomShell.install().
Stacktrace:
[1] electron() at /Users/George/.julia/v0.6/Blink/src/AtomShell/process.jl:53
[2] #init#5(::Bool, ::Function) at /Users/George/.julia/v0.6/Blink/src/AtomShell/process.jl:71
[3] (::Blink.AtomShell.#kw##init)(::Array{Any,1}, ::Blink.AtomShell.#init) at ./:0
[4] #shell#8(::Bool, ::Function) at /Users/George/.julia/v0.6/Blink/src/AtomShell/process.jl:114
[5] Type at /Users/George/.julia/v0.6/Blink/src/AtomShell/window.jl:37 [inlined]
[6] get_window at /Users/George/.julia/v0.6/PlotlyJS/src/displays/electron.jl:51 [inlined]
[7] #get_window#46(::Array{Any,1}, ::Function, ::PlotlyJS.ElectronDisplay) at /Users/George/.julia/v0.6/PlotlyJS/src/displays/electron.jl:64
[8] (::PlotlyJS.#kw##get_window)(::Array{Any,1}, ::PlotlyJS.#get_window, ::PlotlyJS.ElectronDisplay) at ./:0
[9] #get_window#47(::Array{Any,1}, ::Function, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at /Users/George/.julia/v0.6/PlotlyJS/src/displays/electron.jl:109
[10] (::PlotlyJS.#kw##get_window)(::Array{Any,1}, ::PlotlyJS.#get_window, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at ./:0
[11] #display_blink#49(::Bool, ::Bool, ::Function, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at /Users/George/.julia/v0.6/PlotlyJS/src/displays/electron.jl:116
[12] (::PlotlyJS.#kw##display_blink)(::Array{Any,1}, ::PlotlyJS.#display_blink, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at ./:0
[13] (::Base.Multimedia.#kw##display)(::Array{Any,1}, ::Base.Multimedia.#display, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at ./:0
[14] svg_data(::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}, ::String, ::Bool) at /Users/George/.julia/v0.6/PlotlyJS/src/displays/electron.jl:214
[15] #savefig#100(::Symbol, ::Function, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}, ::String) at /Users/George/.julia/v0.6/PlotlyJS/src/savefig.jl:126
[16] savefig(::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}, ::String) at /Users/George/.julia/v0.6/PlotlyJS/src/savefig.jl:106
[17] include_from_node1(::String) at ./loading.jl:569
[18] include(::String) at ./sysimg.jl:14
[19] process_options(::Base.JLOptions) at ./client.jl:305
[20] _start() at ./client.jl:371
while loading ...

@gtollefson
Copy link
Author

I should mention I have also installed rsvg and cairo and this function worked fine until updating my packages.

@sglyon
Copy link
Member

sglyon commented Feb 2, 2018

Hmm, sorry to hear about that. Let's get to the bottom of it!

Can you give more information about your setup? Could you please answer these questions:

  • What is your operating system
  • what versions of PlotlyJS.jl and Blink.jl are you using
  • where are you running the code (repl, jupyter, Juno (atom), or vs code, etc.)

@gtollefson
Copy link
Author

Thanks for your quick reply @sglyon !

  • Mac OS High Sierra 10.13.2

  • running Julia 0.6.0

  • PlotlyJS 0.10.0

  • Blink.jl 0.6.0

  • Running my script from the command line

@sglyon
Copy link
Member

sglyon commented Feb 2, 2018

hmm.. very similar to my setup. Can you hop on Gitter for a quicker chat to figure it out?

https://gitter.im/spencerlyon2/PlotlyJS.jl

@gtollefson
Copy link
Author

Certainly. Thank you!

@sglyon
Copy link
Member

sglyon commented Feb 2, 2018

using Blink
Blink.AtomShell.remove()
Blink.AtomShell.install()

fixed the issue

@StefanPofahl
Copy link

I have troubles to follow your advice. I guess Blink.AtomShell.remove() is now Blink.AtomShell.rm().
If I send the command: Blink.AtomShell.install() I see:

ulia> Blink.AtomShell.install()
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Warning: Failed to open the file electron-v4.0.4-linux-x64.zip: Permission 
Warning: denied
  0 71.6M    0 16375    0     0  36714      0  0:34:06 --:--:--  0:34:06 36714
curl: (23) Failure writing output to destination
ERROR: failed process: Process(`curl -f -o electron-v4.0.4-linux-x64.zip -L https://github.com/electron/electron/releases/download/v4.0.4/electron-v4.0.4-linux-x64.zip`, ProcessExited(23)) [23]

Stacktrace:
 [1] pipeline_error
   @ ./process.jl:538 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base ./process.jl:453
 [3] run
   @ ./process.jl:451 [inlined]
 [4] download
   @ ~/.julia/packages/Blink/mwJC9/src/AtomShell/install.jl:31 [inlined]
 [5] (::Blink.AtomShell.var"#1#2")()
   @ Blink.AtomShell ~/.julia/packages/Blink/mwJC9/src/AtomShell/install.jl:68
 [6] cd(f::Blink.AtomShell.var"#1#2", dir::String)
   @ Base.Filesystem ./file.jl:106
 [7] install()
   @ Blink.AtomShell ~/.julia/packages/Blink/mwJC9/src/AtomShell/install.jl:30
 [8] top-level scope
   @ REPL[56]:1

@mzaffalon
Copy link
Contributor

Your solution does not work anymore? JuliaGizmos/Blink.jl#286 (comment)

@StefanPofahl
Copy link

To be honest I had forgotten that I posted this here ...
It is strange, the current version of this zip-file does not contain a folder /src/
I have already deleted: Project.toml and Manifest.toml in the folder ../environments/v1.6
but this was not enough ...
Now cannot even install PlotlyJS successfully. I do not know what to do ...

@mzaffalon
Copy link
Contributor

I install PlotlyJS regularly with Julia 1.8 and I don't see the problem you described.

@StefanPofahl
Copy link

Yes, that is also my conclusion, that I should switch to Julia v1.8 ...
I do not know by when I find the time to install and test it.

@StefanPofahl
Copy link

StefanPofahl commented Dec 7, 2022

It is strange, the current version of this zip-file does not contain a folder /src/

P.S.:
I figured out that the /src/ folder is included in the zip-archive of the Blink-package.
The electron-v4.0.4-linux-x64.zip contains the electron-executable.

@StefanPofahl
Copy link

Unfortunately, also under Julia v1.8.3 I face issues:

(@v1.8) pkg> build PlotlyJS
    Building WebIO ───→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/55ea1b43214edb1f6a228105a219c6e84f1f5533/build.log`
    Building Blink ───→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/08d0b679fd7caa49e2bca9214b131289e19808c0/build.log`
ERROR: Error building `Blink`: 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Warning: Failed to open the file electron-v4.0.4-linux-x64.zip: Permission 
Warning: denied
  0 71.6M    0 16375    0     0  24227      0  0:51:41 --:--:--  0:51:41 24227
curl: (23) Failure writing output to destination
ERROR: LoadError: failed process: Process(`curl -f -o electron-v4.0.4-linux-x64.zip -L https://github.com/electron/electron/releases/download/v4.0.4/electron-v4.0.4-linux-x64.zip`, ProcessExited(23)) [23]

Stacktrace:
  [1] pipeline_error
    @ ./process.jl:565 [inlined]
  [2] run(::Cmd; wait::Bool)
    @ Base ./process.jl:480
  [3] run
    @ ./process.jl:477 [inlined]
  [4] download
    @ ~/.julia/packages/Blink/mwJC9/src/AtomShell/install.jl:28 [inlined]
  [5] (::Main.BuildBlink.var"#1#2")()
    @ Main.BuildBlink ~/.julia/packages/Blink/mwJC9/src/AtomShell/install.jl:65
  [6] cd(f::Main.BuildBlink.var"#1#2", dir::String)
    @ Base.Filesystem ./file.jl:112
  [7] install()
    @ Main.BuildBlink ~/.julia/packages/Blink/mwJC9/src/AtomShell/install.jl:27
  [8] top-level scope
    @ ~/.julia/packages/Blink/mwJC9/deps/build.jl:14
  [9] include(fname::String)
    @ Base.MainInclude ./client.jl:476
 [10] top-level scope
    @ none:5
in expression starting at /home/stefan/.julia/packages/Blink/mwJC9/deps/build.jl:1

@BeastyBlacksmith
Copy link
Member

The error message says that you don't have write permission. Are you on a cluster or similar?

@StefanPofahl
Copy link

StefanPofahl commented Dec 9, 2022

Thanks for your reply! - It is my own computer, the .julia folder is local.
Yesterday I installed Julia v1.8.3 to exclude a Julia version issue with julia-LTS.
Bevore my new attempt to install Blink.jl I have removed the entire folder ~/.julia/packages as well as the folder ~/.julia/environments. In addition I have started the julia process as admin: sudo julia.
The error message is still there and quite strange.
First thing I tried is to find the command curl ..., this was not successful, I guess this command
is invoked by:

download("https://github.com/electron/electron/releases/download/v$version/$file")

inside:

~/.julia/packages/Blink/mwJC9/src/AtomShell/install.jl

In the script:

.julia/packages/Blink/mwJC9/src/AtomShell/process.jl

I found the hint, where Blink.jl expects the executable electron:

const _electron = resolve_blink_asset("deps/atom/electron")

I added the folder:

.julia/packages/Blink/mwJC9/deps/atom/

and copied into this folder the content of: electron-v4.0.4-linux-x64.zip.
Now it is possible to build the package Blink inside the Pkg-Mode:

(@v1.8) pkg> build Blink

It would be interesting to figure out what the current folder is, in the moment the curl-command is executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants