Julia 1.5, error with JuliaInterpreter but it is not installed

Hello everyone,

I have this weird error when loading one of my packages in Julia 1.5. In 1.4, there is no issue at all:

Error: evaluation error starting at /home/omerchiers/Documents/Travail/02-Recherche/Informatique/Developpement/01-projets_develloppement/Julia/Packages/MultiLayerNFRHT/src/heat_transfer_plane_geometry.jl:273
│   mod = MultiLayerNFRHT
│   ex =
│    quote
│        #= /home/omerchiers/Documents/Travail/02-Recherche/Informatique/Developpement/01-projets_develloppement/Julia/Packages/MultiLayerNFRHT/src/heat_transfer_plane_geometry.jl:273 =#
│        function integrand_double(field::Evanescent, pol::Polarization, b1::LayerOrMultiLayer, b2::LayerOrMultiLayer, gap::Layer, T1, T2, w1, w2; tol = 1.0e-6)
│            #= /home/omerchiers/Documents/Travail/02-Recherche/Informatique/Developpement/01-projets_develloppement/Julia/Packages/MultiLayerNFRHT/src/heat_transfer_plane_geometry.jl:273 =#
│            #= /home/omerchiers/Documents/Travail/02-Recherche/Informatique/Developpement/01-projets_develloppement/Julia/Packages/MultiLayerNFRHT/src/heat_transfer_plane_geometry.jl:274 =#
│            u1 = (w1 * ħ) / kb
│            #= /home/omerchiers/Documents/Travail/02-Recherche/Informatique/Developpement/01-projets_develloppement/Julia/Packages/MultiLayerNFRHT/src/heat_transfer_plane_geometry.jl:275 =#
│            u2 = (w2 * ħ) / kb
│            #= /home/omerchiers/Documents/Travail/02-Recherche/Informatique/Developpement/01-projets_develloppement/Julia/Packages/MultiLayerNFRHT/src/heat_transfer_plane_geometry.jl:276 =#
│            integr(x) = begin
│                    #= /home/omerchiers/Documents/Travail/02-Recherche/Informatique/Developpement/01-projets_develloppement/Julia/Packages/MultiLayerNFRHT/src/heat_transfer_plane_geometry.jl:276 =#
│                    (bose_einstein((x[1] * kb) / ħ, T1) - bose_einstein((x[1] * kb) / ħ, T2)) * x[2] * x[1] ^ 2 * transmission_kx_w(field, b1, b2, gap, pol, ((x[2] * x[1] * kb) / ħ) / c0, (x[1] * kb) / ħ)
│                end
│            #= /home/omerchiers/Documents/Travail/02-Recherche/Informatique/Developpement/01-projets_develloppement/Julia/Packages/MultiLayerNFRHT/src/heat_transfer_plane_geometry.jl:277 =#
│            integr2(y) = begin
│                    #= /home/omerchiers/Documents/Travail/02-Recherche/Informatique/Developpement/01-projets_develloppement/Julia/Packages/MultiLayerNFRHT/src/heat_transfer_plane_geometry.jl:277 =#
│                    integr([y[1], 1 + y[2] / (1 - y[2])]) / (1 - y[2]) ^ 2
│                end
│            #= /home/omerchiers/Documents/Travail/02-Recherche/Informatique/Developpement/01-projets_develloppement/Julia/Packages/MultiLayerNFRHT/src/heat_transfer_plane_geometry.jl:278 =#
│            (val, err) = hcubature(integr2, [u1, 0.0], [u2, 1.0]; rtol = tol)
│            #= /home/omerchiers/Documents/Travail/02-Recherche/Informatique/Developpement/01-projets_develloppement/Julia/Packages/MultiLayerNFRHT/src/heat_transfer_plane_geometry.jl:279 =#
│            return val
│        end
│    end
│   exception =
│    UndefVarError: #integr#100 not defined
│    Stacktrace:
│     [1] macro expansion at /home/omerchiers/.julia/packages/JuliaInterpreter/CPmYX/src/interpret.jl:60 [inlined]
│     [2] getargs(::Array{Any,1}, ::JuliaInterpreter.Frame) at /home/omerchiers/.julia/packages/JuliaInterpreter/CPmYX/src/builtins.jl:8
└ @ Revise ~/.julia/packages/Revise/0meWR/src/lowered.jl:106

It’s only a small part of the stacktrace.
It seems to come because I define a function inside a function?
This version is a simplified version of my real code. Unfortunately I cannot reproduce the error with this piece of code.

f1(x) = 2x
f2(f,x) = f(x)
function f2(y)
    e(u) = u*f1(y)

But I guess this is not the origin of the problem?
The error only occurs in Julia 1.5:

julia> versioninfo()
Julia Version 1.5.1
Commit 697e782ab8 (2020-08-25 20:08 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, haswell)
  JULIA_EDITOR = atom  -a

Here is my Pkg status

Status `~/.julia/environments/v1.5/Project.toml`
  [537997a7] AbstractPlotting v0.10.2
  [28f2ccd6] ApproxFun v0.11.11
  [7e558dbc] ArbNumerics v1.0.3
  [c52e3926] Atom v0.12.11
  [70b36510] AutomaticDocstrings v1.0.0
  [fbb218c0] BSON v0.2.6
  [6e4b80f9] BenchmarkTools v0.5.0
  [a9c8d775] CPUTime v1.0.0
  [336ed68f] CSV v0.6.1
  [c5f51814] CUDAdrv v6.2.2
  [be33ccc6] CUDAnative v3.0.4
  [5ae59095] Colors v0.11.2
  [3a865a2d] CuArrays v2.1.0
  [a93c6f00] DataFrames v0.20.2
  [5cc6ac4e] DispersionRelations v0.1.0 `~/Documents/Travail/02-Recherche/Informatique/Developpement/01-projets_develloppement/Julia/Packages/DispersionRelations`
  [31c24e10] Distributions v0.22.6
  [ffbed154] DocStringExtensions v0.8.1
  [634d3b9d] DrWatson v1.10.2
  [5789e2e9] FileIO v1.3.0
  [53c48c17] FixedPointNumbers v0.7.1
  [f6369f11] ForwardDiff v0.10.10
  [713c75ef] Franklin v0.9.0
  [28b8d3ca] GR v0.48.0
  [4d00f742] GeometryTypes v0.7.6 `https://github.com/JuliaGeometry/GeometryTypes.jl.git#master`
  [dc211083] Gnuplot v1.0.0
  [19dc6840] HCubature v1.4.0
  [cd3eb016] HTTP v0.8.14
  [7073ff75] IJulia v1.21.2
  [6a3955dd] ImageFiltering v0.6.11
  [6218d12a] ImageMagick v1.1.4
  [c601a237] Interact v0.10.3
  [81850811] InteractiveChaos v0.3.2
  [a98d9a8b] Interpolations v0.12.9
  [e5e0dc1b] Juno v0.8.2
  [b964fa9f] LaTeXStrings v1.1.0
  [2fda8390] LsqFit v0.10.0
  [ee78f7c6] Makie v0.10.0
  [eff96d63] Measurements v2.1.1
  [47be7bcc] ORCA v0.3.1
  [5fb14364] OhMyREPL v0.5.5
  [3b7a836e] PGFPlots v3.2.1
  [8314cec4] PGFPlotsX v1.2.6
  [9b87118b] PackageCompiler v1.1.1
  [d96e819e] Parameters v0.12.0
  [5ad8b20f] PhysicalConstants v0.2.0
  [14b8a8f1] PkgTemplates v0.7.5
  [58dd65bb] Plotly v0.3.0
  [f0f68f2c] PlotlyJS v0.13.1
  [91a5bcdd] Plots v1.0.14
  [c3e4b0f8] Pluto v0.11.10
  [c46f51b8] ProfileView v0.6.4
  [438e738f] PyCall v1.91.4
  [d330b81b] PyPlot v2.9.0
  [1fd47b50] QuadGK v2.3.1
  [ce6b1742] RDatasets v0.6.7
  [189a3867] Reexport v0.2.0
  [295af30f] Revise v2.6.3
  [f2b01f46] Roots v1.0.1
  [a0859a10] RootsAndPoles v1.0.0
  [276daf66] SpecialFunctions v0.10.0
  [31924712] SphericalShellNFRHT v0.1.0 `~/Documents/Travail/02-Recherche/Informatique/Developpement/01-projets_develloppement/Julia/Packages/SphericalShellNFRHT`
  [90137ffa] StaticArrays v0.12.1
  [2913bbd2] StatsBase v0.32.2
  [09ab397b] StructArrays v0.4.3
  [24249f21] SymPy v1.0.27
  [5455fcd6] TestProject v0.1.0 `~/Documents/Travail/02-Recherche/Informatique/Developpement/01-projets_develloppement/Julia/Packages/TestProject`
  [d02b474b] Tetris v0.1.0 `https://github.com/mossr/Tetris.jl#master`
  [37b6cedf] Traceur v0.3.0
  [1986cc42] Unitful v1.1.0
  [ddb6d928] YAML v0.4.0
  [c4c688b2] jlpkg v1.1.3
type or paste code here

As you can see I don’t even have JuliaInterPreter installed.
Any help would be greatly appreciated.

Revise uses JuliaInterpreter. Use pkg> status -m to see all packages you have installed (even dependencies).

1 Like

Oh thanks for pointing that out!

Is it a revise issue then?
I know it’s a problem I cannot single out the cause with a MWE, but any clue of what could go wrong from the stacktrace?
Thanks again

Revise has an extremely difficult job so I guess something isn’t working 100%. There a big update to revise coming soon, maybe that will fix it. Best would be to try to generate some kind of MWE and open an issue.

1 Like

Please test [ANN] Revise 3.0 in beta: faster and better and let us know how it works out!


Thanks to all of you for having a look at this.
I cleaned my global environment and now things are working fine.
Both Revise 3 and Revise 2.7. are working well.
In my previous environment I was stuck on Revise 2.6.3.
Something was blocking me from updating to 2.7.
Strangely, with identical Project and Manifest files in julia 1.5 and 1.4, I was getting the error only in julia 1.5.
I’m still not able to reproduce the error with a MWE.
I would have to go through all packages in my environment to find out which one is causing the error which is too much work for me now.
So I’ll consider this closed for now.

Thanks again.

1 Like