Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no more override_component_attrs for multilinks #695

Merged
merged 10 commits into from
Jul 26, 2023
Merged

Conversation

fneum
Copy link
Member

@fneum fneum commented Jul 13, 2023

Requires PyPSA master (to be v0.25.1)

Copy link
Contributor

@FabianHofmann FabianHofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love it

@fneum
Copy link
Member Author

fneum commented Jul 25, 2023

Hmm, I think I have to have another look.

Traceback (most recent call last):
  File "/home/runner/work/pypsa-eur/pypsa-eur/.snakemake/scripts/tmp0xfcjq8f.make_summary.py", line 709, in <module>
    df = make_summaries(networks_dict)
  File "/home/runner/work/pypsa-eur/pypsa-eur/.snakemake/scripts/tmp0xfcjq8f.make_summary.py", line 671, in make_summaries
    df[output] = globals()["calculate_" + output](n, label, df[output])
  File "/home/runner/work/pypsa-eur/pypsa-eur/.snakemake/scripts/tmp0xfcjq8f.make_summary.py", line 306, in calculate_energy
    totals.loc[no_bus] = n.component_attrs[c.name].loc[
  File "/home/runner/micromamba/envs/pypsa-eur/lib/python3.10/site-packages/pandas/core/indexing.py", line 1096, in __getitem__
    return self.obj._get_value(*key, takeable=self._takeable)
  File "/home/runner/micromamba/envs/pypsa-eur/lib/python3.10/site-packages/pandas/core/frame.py", line 3877, in _get_value
    row = self.index.get_loc(index)
  File "/home/runner/micromamba/envs/pypsa-eur/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3655, in get_loc
    raise KeyError(key) from err
KeyError: 'p2'

@FabianHofmann
Copy link
Contributor

probably a calculate_dependent_values() in advance should do it?

@fneum fneum marked this pull request as ready for review July 26, 2023 06:48
@fneum fneum enabled auto-merge July 26, 2023 06:49
@fneum fneum merged commit 799f4f3 into master Jul 26, 2023
@fneum fneum deleted the multilinks-default branch July 26, 2023 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants