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

UndefVarError: Float32Convert not defined #241

Closed
Sbozzolo opened this issue Jun 13, 2024 · 5 comments
Closed

UndefVarError: Float32Convert not defined #241

Sbozzolo opened this issue Jun 13, 2024 · 5 comments

Comments

@Sbozzolo
Copy link

I updated to GeoMakie 0.7 and now my tests are failing:

CairoMakieExt: Error During Test at /home/sbozzolo/repos/ClimaAnalysis.jl/test/GeoMakieExt.jl:8
  Got exception outside of a @test
  UndefVarError: `Float32Convert` not defined
  Stacktrace:
    [1] axis_setup!(axis::GeoMakie.GeoAxis)
      @ GeoMakie ~/.julia/packages/GeoMakie/L2UOi/src/makie-axis.jl:22
    [2] initialize_block!(axis::GeoMakie.GeoAxis)
      @ GeoMakie ~/.julia/packages/GeoMakie/L2UOi/src/geoaxis.jl:532
    [3] _block(T::Type{GeoMakie.GeoAxis}, fig_or_scene::Makie.Figure, args::Vector{Any}, kwdict::Dict{Symbol, Any}, bbox::Nothing; kwdict_complete::Bool)
      @ Makie ~/.julia/packages/Makie/ND0gA/src/makielayout/blocks.jl:388
    [4] _block(T::Type{GeoMakie.GeoAxis}, fig_or_scene::Makie.Figure, args::Vector{Any}, kwdict::Dict{Symbol, Any}, bbox::Nothing)
      @ Makie ~/.julia/packages/Makie/ND0gA/src/makielayout/blocks.jl:308
    [5] _block(::Type{GeoMakie.GeoAxis}, ::Makie.Figure; bbox::Nothing, kwargs::@Kwargs{title::String})
      @ Makie ~/.julia/packages/Makie/ND0gA/src/makielayout/blocks.jl:276
    [6] _block(::Type{GeoMakie.GeoAxis}, ::GridLayoutBase.GridPosition; kwargs::@Kwargs{title::String})
      @ Makie ~/.julia/packages/Makie/ND0gA/src/makielayout/blocks.jl:270
    [7] _block
      @ ~/.julia/packages/Makie/ND0gA/src/makielayout/blocks.jl:263 [inlined]
    [8] #_#1346
      @ ~/.julia/packages/Makie/ND0gA/src/makielayout/blocks.jl:254 [inlined]
    [9] _geomakie_plot_on_globe!(place::Makie.Figure, var::ClimaAnalysis.OutputVar{Vector{Float64}, Base.ReshapedArray{Float64, 2, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, Tuple{}}, String, Dict{String, String}, Interpolations.Extrapolation{Float64, 2, Interpolations.GriddedInterpolation{Float64, 2, Matrix{Float64}, Interpolations.Gridded{Interpolations.Linear{Interpolations.Throw{Interpolations.OnGrid}}}, Tuple{Vector{Float64}, Vector{Float64}}}, Interpolations.Gridded{Interpolations.Linear{Interpolations.Throw{Interpolations.OnGrid}}}, Interpolations.Throw{Nothing}}}; p_loc::Tuple{Int64, Int64}, plot_coastline::Bool, more_kwargs::Dict{Symbol, Dict}, plot_fn::typeof(MakieCore.surface!))
      @ GeoMakieExt ~/repos/ClimaAnalysis.jl/ext/GeoMakieExt.jl:53
   [10] _geomakie_plot_on_globe!
      @ ~/repos/ClimaAnalysis.jl/ext/GeoMakieExt.jl:13 [inlined]
   [11] #heatmap2D_on_globe!#2
      @ ~/repos/ClimaAnalysis.jl/ext/GeoMakieExt.jl:117 [inlined]

Here's my env:

Status `/tmp/jl_vI95rm/Project.toml`
  [4c88cf16] Aqua v0.8.7
  [13f3f980] CairoMakie v0.12.2
  [29b5916a] ClimaAnalysis v0.5.2 `~/repos/ClimaAnalysis.jl`
  [e30172f5] Documenter v1.4.1
  [db073c08] GeoMakie v0.7.0
  [a98d9a8b] Interpolations v0.15.1
  [98e50ef6] JuliaFormatter v1.0.56
  [85f8d34a] NCDatasets v0.14.4
  [bac558e1] OrderedCollections v1.6.3
  [1bc83da4] SafeTestsets v0.1.0
  [10745b16] Statistics v1.10.0
  [8dfed614] Test

The release notes mention something about Float32. Is something required to move to 0.7?

@asinghvi17
Copy link
Member

Nothing should be required, but thanks for letting me know.

What's the output of:

]st -m Makie

@asinghvi17 asinghvi17 changed the title UndefVarError: Float32Convert not defined UndefVarError: Float32Convert not defined Jun 13, 2024
@asinghvi17
Copy link
Member

You will need Makie v0.21 as well, otherwise GeoMakie won't work. If you loaded an older version of Makie from an external environment, then I could understand why you would see this issue. But there should be absolutely no way for this to happen otherwise.

@Sbozzolo
Copy link
Author

Sbozzolo commented Jun 13, 2024

Status `/tmp/jl_DXeIYt/Manifest.toml`
⌅ [ee78f7c6] Makie v0.20.10
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`

Indeed, I have 0.20.10.

Shouldn't GeoMakie compats forbid from having incompatible versions of Makie?

This is my compat section:

[compat]
Aqua = "0.8"
CairoMakie = "0.11.11, 0.12"
Documenter = "1"
GeoMakie = "0.6.5, 0.7"
Interpolations = "0.14, 0.15"
JuliaFormatter = "1"
NCDatasets = "0.13.1, 0.14"
OrderedCollections = "1.3"
SafeTestsets = "0.1"
Statistics = "1"
Test = "1"
julia = "1.9"

st -o -m Makie:

Status `/tmp/jl_DXeIYt/Manifest.toml`
⌅ [ee78f7c6] Makie v0.20.10 (<v0.21.2): CairoMakie, GeoMakie

@asinghvi17
Copy link
Member

asinghvi17 commented Jun 13, 2024

Yes, I'm not sure why this is the case. I suspect the issue is that environments are being stacked somehow.

Try this compat section:

[compat]
Aqua = "0.8"
CairoMakie = "0.12"
Documenter = "1"
GeoMakie = "0.7"
Interpolations = "0.14, 0.15"
JuliaFormatter = "1"
NCDatasets = "0.13.1, 0.14"
OrderedCollections = "1.3"
SafeTestsets = "0.1"
Statistics = "1"
Test = "1"
julia = "1.9"

and maybe run Pkg.resolve?

@Sbozzolo
Copy link
Author

Yes, I'm not sure why this is the case. I suspect the issue is that environments are being stacked somehow.

Try this compat section:

[compat]
Aqua = "0.8"
CairoMakie = "0.12"
Documenter = "1"
GeoMakie = "0.7"
Interpolations = "0.14, 0.15"
JuliaFormatter = "1"
NCDatasets = "0.13.1, 0.14"
OrderedCollections = "1.3"
SafeTestsets = "0.1"
Statistics = "1"
Test = "1"
julia = "1.9"

and maybe run Pkg.resolve?

This works, and now that I looked at CI more carefully, I realized the reason it's failing is not the same as what I have locally.

It's possible that something is off with my environments locally, so I think we can close this issue.

Thank you very much for your very quick help!

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

2 participants