Code Monkey home page Code Monkey logo

Comments (8)

montyvesselinov avatar montyvesselinov commented on June 3, 2024

This needs to be fixed. I do not think it is ok PlotlyKaleido to break the compilation of PlotlyJS. In many cases, PlotlyKaleido is not used at all when PlotlyJS is executed.

This should be just a warning message.

from plotlyjs.jl.

BeastyBlacksmith avatar BeastyBlacksmith commented on June 3, 2024

I do agree that PlotlyJS should remain usable even if the kaleido process hangs. I also think it should issue a warning at using time if that is the case to prevent surprises when trying to save.

from plotlyjs.jl.

disberd avatar disberd commented on June 3, 2024

This is the error message that is just logged with JuliaPlots/PlotlyKaleido.jl#18

Precompilation doesn't fail but savefig will not work. It will actually error (after re-displaying the log error as it will try to restart the kaleido process)

image

from plotlyjs.jl.

montyvesselinov avatar montyvesselinov commented on June 3, 2024

For me it fails:

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.10.2 (2024-03-01)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> import PlotlyJS
ERROR: InitError: It looks like the kaleido process is hanging.
If you are on windows this might be caused by known problems with Kaleido v0.2 on windows.
You might want to try forcing a downgrade of the kaleido library to 0.1.
Check the Package Readme at https://github.com/JuliaPlots/PlotlyKaleido.jl/tree/main#windows-note for more details
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] readline_noblock
    @ C:\Users\monty\.julia\packages\PlotlyKaleido\aujjS\src\PlotlyKaleido.jl:52
  [3] #start#6
    @ C:\Users\monty\.julia\packages\PlotlyKaleido\aujjS\src\PlotlyKaleido.jl:128
  [4] start
    @ C:\Users\monty\.julia\packages\PlotlyKaleido\aujjS\src\PlotlyKaleido.jl:59 [inlined]
  [5] __init__()
    @ PlotlyJS C:\Users\monty\.julia\packages\PlotlyJS\b6MbQ\src\PlotlyJS.jl:104
  [6] run_module_init(mod::Module, i::Int64)
    @ Base .\loading.jl:1134
  [7] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1122
  [8] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base .\loading.jl:1067
  [9] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base .\loading.jl:1581
 [10] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1938
 [11] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1812
 [12] #invoke_in_world#3
    @ .\essentials.jl:926 [inlined]
 [13] invoke_in_world
    @ .\essentials.jl:923 [inlined]
 [14] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1803
 [15] macro expansion
    @ .\loading.jl:1790 [inlined]
 [16] macro expansion
    @ .\lock.jl:267 [inlined]
 [17] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1753
 [18] #invoke_in_world#3
    @ .\essentials.jl:926 [inlined]
 [19] invoke_in_world
    @ .\essentials.jl:923 [inlined]
 [20] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1746
during initialization of module PlotlyJS

julia> @isdefined PlotlyJS
false

from plotlyjs.jl.

disberd avatar disberd commented on June 3, 2024

I was just showing an example putting in an environment PlotlyJS and the dev branch of the PR.

The fix on PlotlyKaleido is not merged yet. I guess you were just trying with latest PlotlyJS with the regular published version of PlotlyKaleido?

from plotlyjs.jl.

montyvesselinov avatar montyvesselinov commented on June 3, 2024

Thank you! I will wait! However, I still think it is better to label this as WARNING rather than ERROR. But I might be wrong.

from plotlyjs.jl.

disberd avatar disberd commented on June 3, 2024

@montyvesselinov try again and make sure that while adding PlotlyJS version 2.2.4 of PlotlyKaleido (the latest) is installed.

Now you should only get a warning during using or precompilation and get an error only when trying to call savefig

image

from plotlyjs.jl.

montyvesselinov avatar montyvesselinov commented on June 3, 2024

from plotlyjs.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.