Repository: electricitymaps/electricitymaps-contrib

Issue:
NO-NO3->SE and NO-NO1->SE exchange forecasts are invalid
```
query_exchange_forecast failed in ENTSOE.py. Reason: <text>
 Invalid business dimension parameters provided. Please check you request against dependency tables. One of the following parameters is not valid for Day-ahead Commercial Schedules [12.1.F]: 10YNO-3--------J, 10YSE-1--------K
</text>
```
NO-NO3->SE and NO-NO1->SE exchange forecasts are invalid
```
query_exchange_forecast failed in ENTSOE.py. Reason: <text>
 Invalid business dimension parameters provided. Please check you request against dependency tables. One of the following parameters is not valid for Day-ahead Commercial Schedules [12.1.F]: 10YNO-3--------J, 10YSE-1--------K
</text>
```


Discussion:
see https://kibana.electricitymap.org/app/kibana#/discover/1710fdd0-2460-11e8-a779-9d01de8d7a71?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-12h,mode:quick,to:now))&_a=(columns:!(level,extra.key,message),filters:!(('$state':(store:appState),exists:(field:level),meta:(alias:!n,disabled:!f,index:'93e631f0-245f-11e8-a779-9d01de8d7a71',key:level,negate:!f,type:exists,value:exists)),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'93e631f0-245f-11e8-a779-9d01de8d7a71',key:level,negate:!t,params:(query:INFO,type:phrase),type:phrase,value:INFO),query:(match:(level:(query:INFO,type:phrase))))),index:'93e631f0-245f-11e8-a779-9d01de8d7a71',interval:auto,query:(language:lucene,query:''),sort:!('@timestamp',desc)) for latest errors
@maxbellec you need to check the forecast (not the actual exchange)

On Tue, Jul 3, 2018 at 5:40 PM maxbellec <notifications@github.com> wrote:

> $ python test_parser.py NO-NO3-\>SE exchange
> parser result:
> {'netFlow': 93.2333, 'datetime': datetime.datetime(2018, 7, 3, 15, 39, tzinfo=tzutc()), 'source': 'driftsdata.stattnet.no', 'sortedZoneKeys': 'NO-NO3->SE'}
> ---------------------
> took 0.73s
> min returned datetime: 2018-07-03 15:39:00+00:00
> max returned datetime: 2018-07-03T15:39:00+00:00 UTC  -- OK, <2h from now :) (now=2018-07-03T15:39:49.558835+00:00 UTC)
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/tmrowco/electricitymap/issues/1480#issuecomment-402201363>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABlEKE4ZbhkWEIRvxCcdUkgEbb-1iIh_ks5uC5BWgaJpZM4U60J0>
> .
>

see https://kibana.electricitymap.org/app/kibana#/discover/1710fdd0-2460-11e8-a779-9d01de8d7a71?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-12h,mode:quick,to:now))&_a=(columns:!(level,extra.key,message),filters:!(('$state':(store:appState),exists:(field:level),meta:(alias:!n,disabled:!f,index:'93e631f0-245f-11e8-a779-9d01de8d7a71',key:level,negate:!f,type:exists,value:exists)),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'93e631f0-245f-11e8-a779-9d01de8d7a71',key:level,negate:!t,params:(query:INFO,type:phrase),type:phrase,value:INFO),query:(match:(level:(query:INFO,type:phrase))))),index:'93e631f0-245f-11e8-a779-9d01de8d7a71',interval:auto,query:(language:lucene,query:''),sort:!('@timestamp',desc)) for latest errors
@maxbellec you need to check the forecast (not the actual exchange)

On Tue, Jul 3, 2018 at 5:40 PM maxbellec <notifications@github.com> wrote:

> $ python test_parser.py NO-NO3-\>SE exchange
> parser result:
> {'netFlow': 93.2333, 'datetime': datetime.datetime(2018, 7, 3, 15, 39, tzinfo=tzutc()), 'source': 'driftsdata.stattnet.no', 'sortedZoneKeys': 'NO-NO3->SE'}
> ---------------------
> took 0.73s
> min returned datetime: 2018-07-03 15:39:00+00:00
> max returned datetime: 2018-07-03T15:39:00+00:00 UTC  -- OK, <2h from now :) (now=2018-07-03T15:39:49.558835+00:00 UTC)
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/tmrowco/electricitymap/issues/1480#issuecomment-402201363>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABlEKE4ZbhkWEIRvxCcdUkgEbb-1iIh_ks5uC5BWgaJpZM4U60J0>
> .
>


Resolving patch:
diff --git a/parsers/ENTSOE.py b/parsers/ENTSOE.py
--- a/parsers/ENTSOE.py
+++ b/parsers/ENTSOE.py
@@ -134,10 +134,14 @@
                    ENTSOE_DOMAIN_MAPPINGS['DK-DK1']],
     'DE->DK-DK2': [ENTSOE_DOMAIN_MAPPINGS['DE-AT-LU'],
                    ENTSOE_DOMAIN_MAPPINGS['DK-DK2']],
-    'DE->SE-SE4': [ENTSOE_DOMAIN_MAPPINGS['SE-SE4'],
-                   ENTSOE_DOMAIN_MAPPINGS['DE-AT-LU']],
+    'DE->SE-SE4': [ENTSOE_DOMAIN_MAPPINGS['DE-AT-LU'],
+                   ENTSOE_DOMAIN_MAPPINGS['SE-SE4']],
     'PL->UA': [ENTSOE_DOMAIN_MAPPINGS['PL'], '10Y1001A1001A869'],
-    'BY->UA': [ENTSOE_DOMAIN_MAPPINGS['BY'], '10Y1001C--00003F']
+    'BY->UA': [ENTSOE_DOMAIN_MAPPINGS['BY'], '10Y1001C--00003F'],
+    'NO-NO3->SE': [ENTSOE_DOMAIN_MAPPINGS['NO-NO3'],
+                   ENTSOE_DOMAIN_MAPPINGS['SE-SE2']],
+    'NO-NO1->SE': [ENTSOE_DOMAIN_MAPPINGS['NO-NO1'],
+                   ENTSOE_DOMAIN_MAPPINGS['SE-SE3']],
 }
 # Some zone_keys are part of bidding zone domains for price data
 ENTSOE_PRICE_DOMAIN_OVERRIDE = {


Test patch: