[pypsa-eur] Error while running Tutorial:Electricity-Only

363 views
Skip to first unread message

Jan Hendrik Smeets

unread,
Nov 14, 2023, 5:55:07 AM11/14/23
to pypsa
Dear pypsa community,

I have encountered an error while trying to run the Electricity-Only Tutorial in pypsa-eur.
The config-file I used is the same as in the tutorial only with the solver beeing gurobi instead of glpk.
I attached the log and config file down below.

I would appreciate any help or insights on how to solve this due to me beeing new to pypsa-eur.

Best
Jan Hendrik Smeets
2023-11-14T112715.334724.snakemake.log
config.electricity.yaml
Message has been deleted

Robert Duy

unread,
Nov 28, 2023, 8:30:43 AM11/28/23
to pypsa
Hi!

I am experiencing the exact same error when trying to run the mentioned tutorial with an up-to-date environment and the default solver (glpk+glpk-default).

Do you already have a solution to your problem? Shall we open a github issue for this?

Best,
Robert

Fabian Neumann

unread,
Nov 29, 2023, 2:34:01 AM11/29/23
to pypsa
Hi Robert,

What are your specific errors? The logfile referenced above does not contain much information which we can help with.

Best wishes,

Fabian N

Robert Duy

unread,
Nov 29, 2023, 3:53:02 AM11/29/23
to pypsa
Hi Fabian,

I gave it another shot and attaching the relevant files. Please let me know if something is missing.

The specific error is:

File "C:\Users\RD\mambaforge\envs\pypsa-eur\lib\site-packages\xarray\core\alignment.py", line 312, in assert_no_index_conflict
    raise ValueError(
ValueError: cannot re-index or align objects with conflicting indexes found for the following coordinates: 'Generator' (2 conflicting indexes)
Conflicting indexes may occur when
- they relate to different sets of coordinate and/or dimension names
- they don't have the same type
- they may be used to reindex data along common dimensions

What I already found is your issue on github with xarray: https://github.com/pydata/xarray/issues/6881
The error is the same, but funnily enough, I can run the MVE from the MVE in my environment.

And a question that came alongside: Is the output from the terminal saved at some place? '.snakemake\log\2023-11-29T094442.121439.snakemake.log' is different from it, as it does not contain the information about the specific error. The attached file 'terminal.log' is copied & pasted.

Thanks for your time & effort in advance!

Best,
Robert


terminal.log
config.electricity.yaml
2023-11-29T092621.338790.snakemake.log
elec_s_6_ec_lcopt_Co2L-24H_python.log
mamba_env.txt

Robert Duy

unread,
Nov 29, 2023, 3:54:41 AM11/29/23
to pypsa
I meant to attach this file instead of 'terminal.log':
(pypsa-eur)_terminal_log .txt

Fabian Hofmann

unread,
Nov 29, 2023, 5:57:38 AM11/29/23
to py...@googlegroups.com

Hey Robert,


could install the full error stack? And could you install pypsa directly from the master and see whether the problem persists?

pip install git+https://github.com/pypsa/pypsa.git@master


Best wishes,

Fabian

--
You received this message because you are subscribed to the Google Groups "pypsa" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pypsa+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pypsa/0efa4767-b6f9-4f4e-a248-1c3163821c1dn%40googlegroups.com.
-- 
Fabian Hofmann 

Postdoctoral Researcher
Institute of Energy Technology
Technische Universität Berlin
http://fabianhofmann.org/

Group website: https://www.tu.berlin/ensys

Jan Hendrik Smeets

unread,
Nov 29, 2023, 6:08:58 AM11/29/23
to pypsa
Hey everyone,
I installed a new environment with the env-file from github but with the xarray version beeing the newest (2023.11.0) and no errors occured running the tutorial or other configs.
Best wishes,
Jan Hendrik

Fabian Hofmann

unread,
Nov 29, 2023, 6:21:48 AM11/29/23
to py...@googlegroups.com

Great, thanks for letting us know, Jan! Hopefully that will solve it for the others.

Best

Fabian Hofmann

Robert Duy

unread,
Nov 29, 2023, 7:15:54 AM11/29/23
to pypsa
Hey all,

just updating xarray to (2023.11.0) in my env solved this problem for me too. Thank you very much!

I guess this means that the tutorial on https://pypsa-eur.readthedocs.io/en/latest/installation.html is currently not working. Following the installation steps, the environment.yaml is explicitly set-up with xarray<=2023.8.0.

Fabian, I could not follow you with the full error stack. But I guess we won't need it. In case, just let me know.

Best,
Robert

Thomas Kouroughli

unread,
Nov 29, 2023, 9:29:50 AM11/29/23
to pypsa
Robert are you running the electricity-only tutorial with estimate_renewable_capacities from_opsd: true? Wondering whether the default here should be changed or if it's another dependency issue. 

For me the tutorial fails with the following error unless I set from_opsd: false 

Using OPSD renewable capacities for carriers offwind-ac, offwind-dc, onwind, solar.
Traceback (most recent call last):
  File "/Users/adminuser/Documents/Coding/TransitionZero/pypsa-eur/.snakemake/scripts/tmp9365bwg3.add_electricity.py", line 899, in <module>
    attach_OPSD_renewables(n, tech_map)
  File "/Users/adminuser/Documents/Coding/TransitionZero/pypsa-eur/.snakemake/scripts/tmp9365bwg3.add_electricity.py", line 734, in attach_OPSD_renewables
    caps = map_country_bus(df.query("Fueltype == @fueltype"), buses)
  File "/Users/adminuser/mambaforge/envs/pypsa-eur/lib/python3.10/site-packages/powerplantmatching/export.py", line 105, in map_country_bus
    return pd.concat(res)
  File "/Users/adminuser/mambaforge/envs/pypsa-eur/lib/python3.10/site-packages/pandas/core/reshape/concat.py", line 372, in concat
    op = _Concatenator(
  File "/Users/adminuser/mambaforge/envs/pypsa-eur/lib/python3.10/site-packages/pandas/core/reshape/concat.py", line 429, in __init__
    raise ValueError("No objects to concatenate")
ValueError: No objects to concatenate 

Reply all
Reply to author
Forward
0 new messages