Hi!
I was trying to run MIMI Nice and it gives me this error:
LoadError: syntax: extra token “NICE_inputs” after end of expression
in expression starting at C:\Users\kiran\Documents\GPIResearch\mimi_NICE-master\src\helpers.jl:6
in expression starting at C:\Users\kiran\Documents\GPIResearch\mimi_NICE-master\src\run_nice.jl:9
Stacktrace:
[1] top-level scope
@ C:\Users\kiran\Documents\GPIResearch\mimi_NICE-master\src\helpers.jl:6
[2] include(fname::String)
@ Base.MainInclude .\client.jl:451
[3] top-level scope
@ C:\Users\kiran\Documents\GPIResearch\mimi_NICE-master\src\run_nice.jl:9
[4] include(fname::String)
@ Base.MainInclude .\client.jl:451
[5] top-level scope
@ In[15]:1
[6] eval
@ .\boot.jl:373 [inlined]
[7] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base .\loading.jl:1196
Any tips on how to fix this?
Thanks so much for your help!
Kiran
Hi @kiranchawla, thank you for the question!
Looking briefly at that model repository, it seems it has not been worked on for several years and perhaps is out of step with current Julia versions.
The particular error seems to come from the line type NICE_inputs{}
on line 6 of helpers.jl
, which may have been old syntax but is not longer used by the Julia language.
type NICE_inputs{}
nsteps::Int64
xi::Float64
omega::Float64
cap_dep::Array{Float64, 1}
rho::Float64
eta::Float64
abate::Array{Float64, 2}
end
Is not valid syntax in current Julia, although I would presume the goal was to create a custom type which is done with mutable struct
ie.
mutable struct NICE_inputs
nsteps::Int64
xi::Float64
omega::Float64
cap_dep::Array{Float64, 1}
rho::Float64
eta::Float64
abate::Array{Float64, 2}
end
I made those changes and continued, but noted a few places where updates would be needed to match current Julia versions and Mimi versions (you can see the repository is a fork at over 30 commits behind it’s parent MimiRICE).
You may want to get in touch with those model developers to see if they have a working version somewhere, or if new work is required. I hoped to see a Manifest.toml
and Project.toml
file that would give more environments information, but they don’t seem to be there.
Sorry to not be of more help!
Thank you - that is very helpful! I will reach out and check if there is a more recent version of the model!
1 Like