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

Standalone Window of PlotlyJS stays blank #377

Closed
CaptainKubi opened this issue May 19, 2021 · 21 comments
Closed

Standalone Window of PlotlyJS stays blank #377

CaptainKubi opened this issue May 19, 2021 · 21 comments

Comments

@CaptainKubi
Copy link

CaptainKubi commented May 19, 2021

Hi there,
when trying to create a plot in a stand-alone GUI window using PlotlyJS only an empty window appears.
A simple call like

using PlotlyJS
plot(rand(10))

only generates an empty window. The plotly loading animation can be seen shortly then it disappears. No error message is displayed. Similarly, plotting using the Plots.jl package using

using Plots
plotlyjs()
plot(rand(10))

has the same effect.

Plots are correctly displayed in VS Codes Plots tab and Pluto.

I am using julia version is 1.6.1 and PlotlyJS version 0.14.1. The issue for me is present both on a windows 10 and OSX 11.1 machine.

I hope someone has an idea what the problem here is. 😄

@fp4code
Copy link

fp4code commented May 20, 2021

Indeed, version 0.14.1 seem buggy: same problem with Ubuntu-21.04 and julia-1.5 ... -1.7. There is no <svg>...</svg> in the html page.

By contrast the plot is OK after installing older version: Pkg.add(name="PlotlyJS", version="0.13.1")

@CaptainKubi
Copy link
Author

Yes, version 0.13.1 works properly with OSX 11.1 as well.

@fp4code
Copy link

fp4code commented May 20, 2021

I made a git bisect. The "faulty" commit is this one 8210092

@fp4code
Copy link

fp4code commented May 20, 2021

Also, Pkg.test("PlotlyJS") is crashing at test/blink.jl (julia-1.5, -1.6, -1.7)

@jkrimmer
Copy link
Contributor

There is already a fix on the way #372. You can also try to install PlotlyJS from the master of my fork for now if you would like to have the most recent build. 🙂

@ghuba
Copy link
Contributor

ghuba commented Jun 15, 2021

I seem to have a similar problem. The plots are no longer showing up. What is the advice to fix this problem?

I tried to run

add https://github.com/jonas-kr/PlotlyJS.jl.git

but it gives me some errors with plotly-artifacts:

 Downloaded artifact: plotly-artifacts
 Downloading artifact: plotly-artifacts
┌ Error: Hash Mismatch!
│   Expected sha256:   05313c2732316c8b2d20b42289bb5d3637905e9ecb17d8e73f5aa7e33a7f4a90
│   Calculated sha256: c945e3724a3969e58dee5a9f00e80a256a5c098e0b4ac8c5838c5a538e186c9d
  Downloaded artifact: plotly-artifacts
ERROR: Unable to automatically install 'plotly-artifacts' from '/Users/darve/.julia/packages/PlotlyJS/GtpSB/Artifacts.toml'

I have Julia 1.6.1, MacOS 11.4, and

(@v1.6) pkg> status
      Status `~/.julia/environments/v1.6/Project.toml`
  [f0f68f2c] PlotlyJS v0.14.1

I also tried:

Pkg.add(name="PlotlyJS", version="0.13.1")

But I get:

julia> using PlotlyJS
ERROR: InitError: SystemError: opening file "/Users/XXX/.julia/packages/PlotlyJS/AhkM5/deps/build.log": No such file or directory

What's the workaround then?

@jkrimmer
Copy link
Contributor

Please try to install PlotlyJS from the following branch:

 add https://github.com/jonas-kr/PlotlyJS.jl#generate-artifacts

My master does not seem to work anymore since I implemented a few additional improvements for #372 .

@PetrKryslUCSD
Copy link

I used the branch reference above, but I'm still getting blank windows. (Windows 10.)

@PetrKryslUCSD
Copy link

Indeed, version 0.14.1 seem buggy: same problem with Ubuntu-21.04 and julia-1.5 ... -1.7. There is no <svg>...</svg> in the html page.

By contrast the plot is OK after installing older version: Pkg.add(name="PlotlyJS", version="0.13.1")

I get a blank window.

@PetrKryslUCSD
Copy link

Plotting works with VS Code plot pane.

@jkrimmer
Copy link
Contributor

I used the branch reference above, but I'm still getting blank windows. (Windows 10.)

This behavior is pretty weird. I have tested the branch "generate-artifacts" on two systems with Windows 10 and julia 1.6.1 and it worked just fine. Is the version number of PlotlyJS bumped to 0.15 after the installation from the "generate-artifacts" branch?

@PetrKryslUCSD
Copy link

PetrKryslUCSD commented Jun 16, 2021

Actually, there was something weird: I thrashed the complete .julia folder. The behavior changed, but now I am getting this error:

julia> mesh_examples.line_mesh_solid()                                         
ERROR: MethodError: no method matching *(::String, ::Float64)                  
Closest candidates are:                                                        
  *(::Any, ::Any, ::Any, ::Any...) at operators.jl:560                         
  *(::Union{AbstractChar, AbstractString}, ::Union{AbstractChar, AbstractString}...) at strings/basic.jl:260                                                  
  *(::StridedArray{P, N} where N, ::Real) where P<:Dates.Period at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Dates\src\deprecated.jl:44                                                                             
  ...                                                                          
Stacktrace:                                                                    
 [1] display_blink(p::PlotlyJS.SyncPlot)                                       
   @ PlotlyJS C:\Users\PetrKrysl\.julia\packages\PlotlyJS\o5UmH\src\display.jl:160                                                                            
 [2] display(#unused#::PlotlyJS.PlotlyJSDisplay, p::PlotlyJS.SyncPlot)         
   @ PlotlyJS C:\Users\PetrKrysl\.julia\packages\PlotlyJS\o5UmH\src\display.jl:155                                                                            
 [3] display(x::Any)                                                           
   @ Base.Multimedia .\multimedia.jl:328                                       
 [4] render(traces::Vector{PlotlyBase.GenericTrace}; kwargs::Base.Iterators.Pairs{Symbol, Matrix{Float64}, Tuple{Symbol}, NamedTuple{(:aspectratio,), Tuple{Matrix{Float64}}}})                                                              
   @ FinEtoolsFlexStructures.VisUtilModule C:\Users\PetrKrysl\00WIP\FinEtoolsFlexStructures.jl\src\VisUtilModule.jl:245                                       
 [5] line_mesh_solid()                                                         
   @ Main.mesh_examples C:\Users\PetrKrysl\00WIP\FinEtoolsFlexStructures.jl\examples\meshing\mesh_examples.jl:45                                              
 [6] top-level scope                                                           
   @ REPL[4]:1                                                                 
                                                                               
julia> using Pkg; Pkg.status();                                                
     Project FinEtoolsFlexStructures v0.1.0                                    
      Status `C:\Users\PetrKrysl\00WIP\FinEtoolsFlexStructures.jl\Project.toml`  [7d9fca2a] Arpack v0.5.2                                                     
  [39dd38d3] Dierckx v0.5.1                                                    
  [91bb5406] FinEtools v5.1.6                                                  
  [e9187c00] FinEtoolsDeforLinear v1.0.1                                       
  [682c06a0] JSON v0.21.1                                                      
  [a03496cd] PlotlyBase v0.5.3 `https://github.com/sglyon/PlotlyBase.jl.git#master`                                                                           
  [f0f68f2c] PlotlyJS v0.15.0 `https://github.com/jonas-kr/PlotlyJS.jl#generate-artifacts`                                                                    
  [295af30f] Revise v3.1.16                                                    
  [286e6d88] SymRCM v0.2.1                                                     
  [37e2e46d] LinearAlgebra                                                     
  [2f01184e] SparseArrays                                                      
  [8dfed614] Test    

It is the error that I got with the registered version of PlotlyJS: #382

@ghuba
Copy link
Contributor

ghuba commented Jun 16, 2021

@jonas-kr
I tested this branch and this is working for me. The plots are showing up normally. No problem so far.

Thanks!

For readers:
Start $ julia. Press ] to enter the pkg mode.

Type:

pkg> add https://github.com/jonas-kr/PlotlyJS.jl#generate-artifacts

to install this branch of PlotlyJS.

@PetrKryslUCSD
Copy link

@ghuba Can you please post the status of your packages? This isn't working for me. I get the errors listed above.

@ghuba
Copy link
Contributor

ghuba commented Jun 16, 2021

(@v1.6) pkg> status
      Status `~/.julia/environments/v1.6/Project.toml`
  [7073ff75] IJulia v1.23.2
  [682c06a0] JSON v0.21.1
  [f0f68f2c] PlotlyJS v0.15.0 `https://github.com/jonas-kr/PlotlyJS.jl#generate-artifacts`
  [276daf66] SpecialFunctions v1.5.1

@PetrKryslUCSD
Copy link

Would you have the PlotlyBase version?

@PetrKryslUCSD
Copy link

I got it to work, with a little work around. Thanks to all: @jonas-kr , @ghuba

@ghuba
Copy link
Contributor

ghuba commented Jun 16, 2021

Great!

@jkrimmer
Copy link
Contributor

Great that both of you figured things out!

@jkrimmer
Copy link
Contributor

This issue should be resolved with the most recent PlotlyJS release v0.15!

@ghuba
Copy link
Contributor

ghuba commented Jun 19, 2021

Yep; I installed the latest PlotlyJS and the issue is resolved for me! thanks. 👍

@sglyon sglyon closed this as completed Jun 20, 2021
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

6 participants