Skip to content

Error with Example - KeyError: key nothing not found #21

@andreasbuettner

Description

@andreasbuettner

Hi there,

First, many thanks for providing this Energy System Modeling Framework including a GUI. In search of a good package for teaching purposes (Energy Economics and Modeling), I discovered EnergyModelsX and find it very promising.
After adding the packages as described in the documentation, I tried running the example given there. Unfortunately, I ran into an error that is not directly clear to me.

# Starts the Julia REPL
using Pkg
using EnergyModelsGUI

# Get the path of the examples directory
exdir = joinpath(pkgdir(EnergyModelsGUI), "examples")

# Activate project for the examples in the EnergyModelsGUI repository
Pkg.activate(exdir)
Pkg.instantiate()

# Include the code into the Julia REPL to run the following example
include(joinpath(exdir, "EMI_geography.jl"))
julia> include(joinpath(exdir, "EMI_geography.jl"))
[ Info: Precompiling EMGExt [e658cd29-cfa6-5522-bc83-ddd4b576cbaf]
[ Info: Generate data coded dummy model for now (Investment Model)
[ Info: Setting up the topology design structure
[ Info: Setting up the GUI
ERROR: LoadError: KeyError: key nothing not found
Stacktrace:
 [1] getindex(h::Dict{Base.UUID, Pkg.Types.PackageEntry}, key::Nothing)
   @ Base ./dict.jl:498
 [2] getindex(m::Pkg.Types.Manifest, i_or_key::Nothing)
   @ Pkg.Types ~/.julia/juliaup/julia-1.10.9+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Types.jl:313
 [3] GUI(case::Case; design_path::String, id_to_color_map::Dict{…}, id_to_icon_map::Dict{…}, model::Model, hide_topo_ax_decorations::Bool, expand_all::Bool, periods_labels::Vector{…}, representative_periods_labels::Vector{…}, scenarios_labels::Vector{…}, path_to_results::String, path_to_descriptive_names::String, descriptive_names_dict::Dict{…}, coarse_coast_lines::Bool, backgroundcolor::ColorTypes.RGB{…}, fontsize::Int64, plot_widths::Tuple{…}, case_name::String, scale_tot_opex::Bool, scale_tot_capex::Bool, colormap::Vector{…}, tol::Float64)
   @ EnergyModelsGUI ~/.julia/packages/EnergyModelsGUI/X6v63/src/setup_GUI.jl:198
 [4] top-level scope
   @ ~/.julia/packages/EnergyModelsGUI/X6v63/examples/EMI_geography.jl:493
 [5] include(fname::String)
   @ Base.MainInclude ./client.jl:494
 [6] top-level scope
   @ REPL[8]:1
in expression starting at /home/service/.julia/packages/EnergyModelsGUI/X6v63/examples/EMI_geography.jl:493
Some type information was truncated. Use `show(err)` to see complete types.

I tried different examples from the repository, too, but still the same error occurs. My system is an Ubuntu Server 22.04 with GUI and X Server installed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions