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

pop window exits after loadind animation displayed #441

Open
zhufengning opened this issue Aug 23, 2022 · 11 comments
Open

pop window exits after loadind animation displayed #441

zhufengning opened this issue Aug 23, 2022 · 11 comments

Comments

@zhufengning
Copy link

Describe the bug
running from shell and it pops a window but exits before plot shows.
深度截图_选择区域_20220823210727.png
running in vscode can normally display plots

Version info

julia> versioninfo()
Julia Version 1.8.0
Commit 5544a0fab76 (2022-08-17 13:38 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 9 5900HS with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, znver3)
  Threads: 1 on 16 virtual cores

@mzaffalon
Copy link
Contributor

Can you post the code?

@zhufengning
Copy link
Author

Can you post the code?

using PlotlyJS, CSV, DataFrames

df = dataset(DataFrame, "iris")

plt = plot(

    df,

    x=:sepal_length, y=:sepal_width, z=:petal_width, color=:species,

    type="scatter3d", mode="markers"

)
display(plt)

and there is no output in the terminal

@mzaffalon
Copy link
Contributor

Maybe you may need a backend for plotting, e.g. using WebIO?

@zhufengning
Copy link
Author

Maybe you may need a backend for plotting, e.g. using WebIO?

WebIO is installed, and there is no difference after added using WebIO.
I think it's a electron problem, the electron process starts and shows the window and loading animation before exits.
The exported html file using PlotlyBase.to_html works well.

@mzaffalon
Copy link
Contributor

Does the following work?

using WebIO, PlotlyJS
plot(scatter(y=randn(100)))

@zhufengning
Copy link
Author

using WebIO, PlotlyJS
p=plot(scatter(y=randn(100)))
display(p)

when using display to show the gui, it still crash.

@mzaffalon
Copy link
Contributor

Could it be a WebIO issue? What happens if you pin the package to v0.8.17 as in JuliaGizmos/WebIO.jl#493 (comment)?

@zhufengning
Copy link
Author

still the same

@mzaffalon
Copy link
Contributor

What is the output of import Pkg; Pkg.status()?

@zhufengning
Copy link
Author

Status `~/repos/fast/Project.toml`
  [336ed68f] CSV v0.10.4
  [a93c6f00] DataFrames v1.3.4
  [28b8d3ca] GR v0.66.2
  [f0f68f2c] PlotlyJS v0.18.8
  [d330b81b] PyPlot v2.11.0
⌃ [0f1e0344] WebIO v0.8.17 ⚲
Info Packages marked with ⌃ have new versions available

i found more about this bug.
if i run julia --project=. a.jl, the window will crash.
if i run julia --project=. and then run include("a.jl") in the repl, the window won't crash.
深度截图_plasmashell_20220824144146.png

@BeastyBlacksmith
Copy link
Member

You need to put a readline() or similar at the end of your script to prevent the julia process from shutting down immediately

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

3 participants