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

[BUG] #288

Closed
maike93he opened this issue Aug 16, 2022 · 3 comments
Closed

[BUG] #288

maike93he opened this issue Aug 16, 2022 · 3 comments
Labels

Comments

@maike93he
Copy link
Collaborator

Describe the bug
When trying to draw a plotly html figure using the function draw_plotly() a KeyError is thrown. Used the function on ding0_test_network_2 and ding0_test_network_4.

---------------------------------------------------------------------------
KeyError: 'Branch_LVStation_mvgd_2095_lvgd_170173_MVStation_mvgd_2095' Traceback (most recent call last):
  File ~/.config/JetBrains/PyCharmCE2022.1/scratches/scratch.py", line 21, in <module>
    draw_plotly(edisgo)
  File ~/Documents/PythonProjects/eDisGo_orig/eDisGo/edisgo/tools/plots.py", line 1057, in draw_plotly
    loading = edisgo_obj.results.s_res.T.loc[edge[2]["branch_name"]].max()
  File ~/Documents/PythonProjects/eDisGo_orig/d_py38_edisgo/lib/python3.8/site-packages/pandas/core/indexing.py", line 967, in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
  File ~/Documents/PythonProjects/eDisGo_orig/d_py38_edisgo/lib/python3.8/site-packages/pandas/core/indexing.py", line 1202, in _getitem_axis
    return self._get_label(key, axis=axis)
  File ~/Documents/PythonProjects/eDisGo_orig/d_py38_edisgo/lib/python3.8/site-packages/pandas/core/indexing.py", line 1153, in _get_label
    return self.obj.xs(label, axis=axis)
  File ~/Documents/PythonProjects/eDisGo_orig/d_py38_edisgo/lib/python3.8/site-packages/pandas/core/generic.py", line 3864, in xs
    loc = index.get_loc(key)
  File ~/Documents/PythonProjects/eDisGo_orig/d_py38_edisgo/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3623, in get_loc
    raise KeyError(key) from err
KeyError: 'Branch_LVStation_mvgd_2095_lvgd_170173_MVStation_mvgd_2095'

To Reproduce
Steps to reproduce the behavior:

  1. Initialize eDisGo object based on ding0_test_network_4
  2. Try to use draw_plotly() function on edisgo object: draw_plotly(edisgo)

Expected behavior
To draw a plotly html figure.

@maike93he maike93he added the bug label Aug 16, 2022
@birgits
Copy link
Collaborator

birgits commented Aug 16, 2022

Which branch are you using?

@maike93he
Copy link
Collaborator Author

features/#276-improve-simple-example

@maike93he
Copy link
Collaborator Author

Found the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants