Skip to content

Commit

Permalink
Merge branch 'fixes/#1102_TYNDP_url' into features/#1067-gas_sanitych…
Browse files Browse the repository at this point in the history
…eck_eGon100RE
  • Loading branch information
AmeliaNadal committed Feb 21, 2023
2 parents 514b164 + cee7f9f commit 3c4e7bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,8 @@ Bug Fixes
* Fix URL of TYNDP scenario dataset
* Automatically generated tasks now get unique :code:`task_id`\s.
Fixes issue `#985`_ via PR `#986`_.
* Bypass SSL verification
`#1102 <https://github.com/openego/eGon-data/issues/1102>`_

.. _PR #692: https://github.com/openego/eGon-data/pull/692
.. _#343: https://github.com/openego/eGon-data/issues/343
Expand Down
5 changes: 5 additions & 0 deletions src/egon/data/datasets/gas_neighbours/eGon2035.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pathlib import Path
from urllib.request import urlretrieve
import ast
import ssl
import zipfile

from shapely.geometry import LineString, MultiLineString
Expand Down Expand Up @@ -1122,7 +1123,11 @@ def calculate_ch4_grid_capacities():
url = "https://www.entsog.eu/sites/default/files/2021-07/" + basename
target_file = Path(".") / "datasets" / "gas_data" / basename

context_backup = ssl._create_default_https_context
ssl._create_default_https_context = ssl._create_unverified_context
urlretrieve(url, target_file)
ssl._create_default_https_context = context_backup

map_pipelines = {
"NORDSTREAM": "RU00",
"NORDSTREAM 2": "RU00",
Expand Down

0 comments on commit 3c4e7bc

Please sign in to comment.