Help: I get this error whenever I try to run my code

ERROR: LoadError: LoadError: During the resolution of the non-linear system, the evaluation of the following equation(s) resulted in a non-finite number: [1]
Stacktrace:
[1] check_isfinite(::Array{Float64,1}) at /home/michalis/JuliaPro-0.6.2.2/JuliaPro/pkgs-0.6.2.2/v0.6/NLsolve/src/nlsolve/utils.jl:35
[2] trust_region_(::NLSolversBase.OnceDifferentiable{Array{Float64,1},Array{Float64,2},Array{Float64,1},Val{false}}, ::Array{Float64,1}, ::Float64, ::Float64, ::Int64, ::Bool, ::Bool, ::Bool, ::Float64, ::Bool, ::NLsolve.NewtonTrustRegionCache{Array{Float64,1}}) at /home/michalis/JuliaPro-0.6.2.2/JuliaPro/pkgs-0.6.2.2/v0.6/NLsolve/src/solvers/trust_region.jl:120
[3] #nlsolve#38(::Symbol, ::Float64, ::Float64, ::Int64, ::Bool, ::Bool, ::Bool, ::LineSearches.Static{Float64}, ::Float64, ::Bool, ::Int64, ::Float64, ::NLsolve.#nlsolve, ::NLSolversBase.OnceDifferentiable{Array{Float64,1},Array{Float64,2},Array{Float64,1},Val{false}}, ::Array{Float64,1}) at /home/michalis/JuliaPro-0.6.2.2/JuliaPro/pkgs-0.6.2.2/v0.6/NLsolve/src/nlsolve/nlsolve.jl:26
[4] (::NLsolve.#kw##nlsolve)(::Array{Any,1}, ::NLsolve.#nlsolve, ::NLSolversBase.OnceDifferentiable{Array{Float64,1},Array{Float64,2},Array{Float64,1},Val{false}}, ::Array{Float64,1}) at ./:0
[5] #nlsolve#39(::Symbol, ::Float64, ::Float64, ::Int64, ::Bool, ::Bool, ::Bool, ::LineSearches.Static{Float64}, ::Float64, ::Bool, ::Int64, ::Float64, ::Symbol, ::Bool, ::NLsolve.#nlsolve, ::#AdsorptionSol, ::Array{Float64,1}) at /home/michalis/JuliaPro-0.6.2.2/JuliaPro/pkgs-0.6.2.2/v0.6/NLsolve/src/nlsolve/nlsolve.jl:59
[6] (::NLsolve.#kw##nlsolve)(::Array{Any,1}, ::NLsolve.#nlsolve, ::Function, ::Array{Float64,1}) at ./:0
[7] macro expansion at /home/michalis/Downloads/Code_Comparison_Modified/NAdsorption.jl:80 [inlined]
[8] anonymous at ./:?
[9] include_from_node1(::String) at ./loading.jl:576
[10] include(::String) at ./sysimg.jl:14
[11] include_from_node1(::String) at ./loading.jl:576
[12] include(::String) at ./sysimg.jl:14
[13] process_options(::Base.JLOptions) at ./client.jl:305
[14] _start() at ./client.jl:371
while loading /home/michalis/Downloads/Code_Comparison_Modified/NAdsorption.jl, in expression starting on line 72
while loading /home/michalis/Downloads/Code_Comparison_Modified/Include.jl, in expression starting on line 5

1 Like

You’ll need to provide a minimal working example of the problem in order to get help. That is, see if you can boil down the problem to a handful of lines of code. Post the code, the error message you get when running it, and the output of julia> versioninfo(), quoting it all with backticks so it’s nicely formatted (see this PSA).

3 Likes