electricitymaps / electricitymaps-contrib

A real-time visualisation of the CO2 emissions of electricity consumption
https://app.electricitymaps.com
GNU Affero General Public License v3.0
3.56k stars 941 forks source link

MN production parser down #5906

Open electricitymapsbot opened 1 year ago

electricitymapsbot commented 1 year ago

Description

This is an automatic error report generated for Mongolia (MN).

Issues:

Suggestions

You can see an overview of all parser issues here.

q-- commented 1 year ago

See https://github.com/electricitymaps/electricitymaps-contrib/issues/5905

electricitymapsbot commented 10 months ago

Closing this as the electricity data is flowing again.

electricitymapsbot commented 9 months ago

Reopening this as the electricity data is no longer flowing.

q-- commented 9 months ago

The endpoint (used by the parser, but also the website) now redirects to a login page instead of returning the JSON.

This is probably a mistake, as the web page still prominently features the image in which the generation was displayed.

Their e-mail if someone wants to contact them: ndc@ndc.energy.mn

electricitymapsbot commented 8 months ago

Closing this as the electricity data is flowing again.

electricitymapsbot commented 7 months ago

Reopening this as the electricity data is no longer flowing.

q-- commented 7 months ago

Same issue as before

The endpoint (used by the parser, but also the website) now redirects to a login page instead of returning the JSON.

This is probably a mistake, as the web page still prominently features the image in which the generation was displayed.

Their e-mail if someone wants to contact them: ndc@ndc.energy.mn

tonypls commented 4 months ago

Bump, still an issue. Would greatly appreciate any help on this one 🙏

q-- commented 4 months ago

https://github.com/electricitymaps/electricitymaps-contrib/issues/5906#issuecomment-1985432604

I checked again, this time it isn't due to the endpoint being down as I can see the JSON response at https://disnews.energy.mn/convertt.php. Not sure what's causing it this time, then.

tonypls commented 4 months ago

Ah thanks! I had a look and it appears there's a key error:

File "/contrib/parsers/MN.py", line 96, in fetch_production query_data = query(session, logger, zone_key) File "/contrib/parsers/MN.py", line 82, in query query_result = parse_json(response_json, logger, zone_key) File "/contrib/parsers/MN.py", line 62, in parse_json query_data[query_key] = float(web_json[src_key]) KeyError: 'sums'

Perhaps they've changed the data structure

VIKTORVAV99 commented 4 months ago

Ah thanks! I had a look and it appears there's a key error:

File "/contrib/parsers/MN.py", line 96, in fetch_production

query_data = query(session, logger, zone_key)

File "/contrib/parsers/MN.py", line 82, in query

query_result = parse_json(response_json, logger, zone_key)

File "/contrib/parsers/MN.py", line 62, in parse_json

query_data[query_key] = float(web_json[src_key])

KeyError: 'sums'

Perhaps they've changed the data structure

I can take a look at it later today then if you wish?

silimotion commented 4 months ago

Hi!

It seems they have also updated the webpage recently:

Screenshot_20240611_174054

Together with the new response from the endpoint:

{"date":"2024-06-11 17:00:00","syssum":"940.5","dts":630.4,"sumnar":29.2,"sumsalhit":45.3,"energyimport":"230.1","t":"23.5","Songino":"0.0"} 

In theory the only changes needed would be to update the keys that have changed, and add the new ones to the ignored list. These new ones would be "dts", which seems to be thermal power plants (they use the same icon to refer to these in the pdf below) and "Songino", which I'm quite unsure but may refer to a place in Mongolia.

q-- commented 4 months ago

"Songino", which I'm quite unsure but may refer to a place in Mongolia.

https://www.adb.org/sites/default/files/project-documents/48030/48030-001-tacr-en_2.pdf page 42 (45 in the PDF) says that it's the name of a substation (and probably a place nearby as well, I'd assume).