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: UndefVarError: kaleido not defined in PlotlyKaleido #22

Closed
jecs opened this issue Oct 31, 2024 · 8 comments
Closed

ERROR: UndefVarError: kaleido not defined in PlotlyKaleido #22

jecs opened this issue Oct 31, 2024 · 8 comments

Comments

@jecs
Copy link

jecs commented Oct 31, 2024

I have been having this issue for a while on my Mac.

julia> using PlotlyKaleido

julia> PlotlyKaleido.start()
ERROR: UndefVarError: `kaleido` not defined in `PlotlyKaleido`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
 [1] start(; plotly_version::Missing, mathjax::Missing, mathjax_version::VersionNumber, timeout::Int64, kwargs::@Kwargs{})
   @ PlotlyKaleido ~/.julia/packages/PlotlyKaleido/U5CX4/src/PlotlyKaleido.jl:79
 [2] start()
   @ PlotlyKaleido ~/.julia/packages/PlotlyKaleido/U5CX4/src/PlotlyKaleido.jl:70
 [3] top-level scope
   @ REPL[2]:1

versioninfo():

Julia Version 1.11.1
Commit 8f5b7ca12ad (2024-10-16 10:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 8 × Apple M2
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, apple-m2)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Pkg.status:

(@v1.11) pkg> status PlotlyKaleido
Status `~/.julia/environments/v1.11/Project.toml`
  [f2990250] PlotlyKaleido v2.2.5
@jd-foster
Copy link
Contributor

Thanks for the report. I can't reproduce the issue unfortunately, despite testing on a very similar system. Perhaps we could make the call to kaleido() use the module name.

@jecs
Copy link
Author

jecs commented Nov 1, 2024

That was quick. Thanks for looking into this! If there's anything that I could do to facilitate triaging this issue, please let me know.

@jecs
Copy link
Author

jecs commented Nov 1, 2024

@jd-foster @BeastyBlacksmith Figured it out! There was a package that was preventing Kaleido_jll from upgrading to v0.2.1 for some reason. The package in question is KomaMRIPlots.

What I don't understand is why Julia wouldn't just download Kaleido_jll only for PlotlyKaleido. Why must it be a "shared" package?

@BeastyBlacksmith
Copy link
Member

What I don't understand is why Julia wouldn't just download Kaleido_jll only for PlotlyKaleido. Why must it be a "shared" package?

Can you clarify what you mean by this?

@jecs
Copy link
Author

jecs commented Nov 2, 2024

What I don't understand is why Julia wouldn't just download Kaleido_jll only for PlotlyKaleido. Why must it be a "shared" package?

Can you clarify what you mean by this?

Sure. Here is the order of events.

  1. I installed KomaMRIPlots, which restricted the version of Kaleido_jll to v0.1.
  2. I installed PlotlyKaleido.jl, and got that error message.
  3. I tried to manually upgrade Kaleido_jll to v0.2.1 with the command add [email protected] and got an error message saying that the requirement was not able to be satisfied.
  4. I removed KomaMRIPlots and was then able to upgrade Kaleido_jll to the proper version.

As I understand it, each package is supposed to exist in its own sandbox, yet having KomaMRIPlots installed prevented Kaleido_jll from being upgraded at all. Why is that? Shouldn't each package have its own version?

@BeastyBlacksmith
Copy link
Member

As I understand it, each package is supposed to exist in its own sandbox

No, that is wrong. Each package sets a range of versions of its dependencies that it is compatible with in the [compat] section of its Project file. For each environment you install a package in, Pkg finds from this the set of versions that are compatible to all the packages of that environment.
To solve this for your specific case, you'd need to ask the people of KomaMRIPlots to add support for Kaleido_jll v0.2.

@jecs
Copy link
Author

jecs commented Nov 5, 2024

Thanks for the explanation! I'm surprised to see that this is the behavior of Pkg. One package can cause all sorts of issues for other packages. Fortunately, we were able to solve it, but if I were new to Julia, an issue like this would probably scare me away.

@BeastyBlacksmith
Copy link
Member

Apart from nix I am unaware of any software environment, that handles this fundamentally differently.

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