Skip to content

Commit

Permalink
fix bug when requesting netpositions at a resolution which has no data
Browse files Browse the repository at this point in the history
  • Loading branch information
fboerman committed Oct 7, 2024
1 parent 4d6b401 commit 6248d17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion entsoe/entsoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
warnings.filterwarnings('ignore', category=XMLParsedAsHTMLWarning)

__title__ = "entsoe-py"
__version__ = "0.6.9"
__version__ = "0.6.10"
__author__ = "EnergieID.be, Frank Boerman"
__license__ = "MIT"

Expand Down
2 changes: 2 additions & 0 deletions entsoe/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def parse_netpositions(xml_text, resolution):
series_all = []
for soup in _extract_timeseries(xml_text):
series = _parse_timeseries_generic(soup)[resolution]
if series is None:
continue
if 'REGION' in soup.find('out_domain.mrid').text:
factor = -1 # flow is import so negative
else:
Expand Down

0 comments on commit 6248d17

Please sign in to comment.