ValueError: Failed to group data. Are you grouping by a variable that is all NaN?

30 views
Skip to first unread message

Lennart Morlock

unread,
Feb 12, 2024, 10:14:27 AM2/12/24
to MUSE
Hi all,

I got the following error message by running the attached input files. The error occurs in the first year (2010) and first sector (residential_hot_water) calculation. It only occurred after I added Technodata_timeslices, so I guess the mistake relates to that. However, I couldn't find the problem with those files. 

Has anybody seen this error message before and got an idea of what causes the error? I found the same error message in this thread, but it seems to be a different problem.

Thanks for any help.

Best regards
Lennart

Running simulation year 2010...

-- 2024-02-12 14:59:09 - muse.sectors.sector - INFO
Running residential_hot_water for year 2010

-- 2024-02-12 14:59:09 - muse.interactions - INFO
Net new_to_retro of 1 interactions interacting via transfer

-- 2024-02-12 14:59:09 - muse.hooks - INFO
Computing initial_asset_transform: default

-- 2024-02-12 14:59:09 - muse.hooks - INFO
Computing initial_asset_transform: clean

-- 2024-02-12 14:59:09 - muse.demand_share - INFO
Computing demand_share: default

-- 2024-02-12 14:59:10 - muse.production - INFO
Computing production: max

-- 2024-02-12 14:59:10 - muse.production - INFO
Computing production: max

-- 2024-02-12 14:59:10 - muse.filters - INFO
Computing initial search-space: from_techs

-- 2024-02-12 14:59:10 - muse.filters - INFO
Computing filter: all

-- 2024-02-12 14:59:10 - muse.filters - INFO
Computing filter: with_asset_technology

-- 2024-02-12 14:59:10 - muse.filters - INFO
Computing filter: compress

-- 2024-02-12 14:59:10 - muse.objectives - INFO
Computing objective: LCOE

-- 2024-02-12 14:59:10 - muse.objectives - INFO
Computing objective: capacity

-- 2024-02-12 14:59:10 - muse.decisions - INFO
Computing decision: single

-- 2024-02-12 14:59:10 - muse.investments - INFO
Computing investment: adhoc

Traceback (most recent call last):
  File "C:\Users\lenna\anaconda3\envs\muse_env\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\lenna\anaconda3\envs\muse_env\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\lenna\anaconda3\envs\muse_env\Scripts\muse.exe\__main__.py", line 7, in <module>
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\__main__.py", line 60, in run
    muse_main(args.settings, args.model, args.copy)
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\__main__.py", line 55, in muse_main
    MCA.factory(settings).run()
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\mca.py", line 346, in run
    _, new_market, self.sectors = self.find_equilibrium(new_market)
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\mca.py", line 209, in find_equilibrium
    return find_equilibrium(
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\mca.py", line 561, in find_equilibrium
    market, equilibrium_sectors = single_year_iteration(market, sectors)
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\mca.py", line 468, in single_year_iteration
    sector_market = sector.next(
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\sectors\sector.py", line 236, in next
    subsector.invest(
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\sectors\subsector.py", line 74, in invest
    lp_problem = self.aggregate_lp(
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\sectors\subsector.py", line 147, in aggregate_lp
    result = agent.next(
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\agents\agent.py", line 421, in next
    investments = self.invest(
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\investments.py", line 168, in compute_investment
    return investment(
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\registration.py", line 172, in decorated
    result = inner_decorated(*args, **kwargs)
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\investments.py", line 99, in decorated
    result = function(costs, search_space, technologies, constraints, **kwargs)
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\investments.py", line 286, in adhoc_match_demand
    production = demand_matching(
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\demand_matching.py", line 249, in demand_matching
    result = demand_matching(  # type: ignore
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\demand_matching.py", line 255, in demand_matching
    return _demand_matching_impl(demand, cost, *constraints)
  File "C:\Users\lenna\MUSE_test2\MUSE_OS\src\muse\demand_matching.py", line 297, in _demand_matching_impl
    for _, same_cost in data.groupby("cost") if cost.dims else [(cost, data)]:
  File "C:\Users\lenna\anaconda3\envs\muse_env\lib\site-packages\xarray\core\common.py", line 721, in groupby
    return self._groupby_cls(
  File "C:\Users\lenna\anaconda3\envs\muse_env\lib\site-packages\xarray\core\groupby.py", line 385, in __init__
    raise ValueError(
ValueError: Failed to group data. Are you grouping by a variable that is all NaN?


 


base_model_nopowse_timeslice_utilisation_test.zip
Reply all
Reply to author
Forward
0 new messages