WattTime / pyiso

Python client libraries for ISO and other power grid data sources.
http://pyiso.readthedocs.org/
Other
237 stars 110 forks source link

Cannot get EU generation report #195

Closed jstaffans closed 6 years ago

jstaffans commented 6 years ago

I'm consistently getting the following error:

  ...
  File "/home/johannes/.virtualenvs/renewables/lib/python3.6/site-packages/pyiso/eu.py", line 228, in get_generation
    return self.parse_response(response)
  File "/home/johannes/.virtualenvs/renewables/lib/python3.6/site-packages/pyiso/eu.py", line 312, in parse_response
    datapoint['fuel_name'] = self.fuels[ts.MktPSRType.psrType.text]
  File "src/lxml/objectify.pyx", line 230, in lxml.objectify.ObjectifiedElement.__getattr__
  File "src/lxml/objectify.pyx", line 450, in lxml.objectify._lookupChildOrRaise
AttributeError: no such child: {urn:iec62325.351:tc57wg16:451-6:generationloaddocument:3:0}MktPSRType

This occurs both with 0.4.0 and the latest master.

I noticed this error today. When I tried retrieving a generation report in early May I didn't see this error.

jstaffans commented 6 years ago

It seems that the ENTSO-E API was temporarily misbehaving and omitting the MktPSRType.psrType element. It works again now.