WattTime / pyiso

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

Safer ISONE generation response parsing #71

Closed aschn closed 8 years ago

aschn commented 8 years ago

Error for ISONEClient.get_generation(latest=True) at 2016-06-01 05:08:00.162154+00:00

  File "/app/.heroku/python/lib/python2.7/site-packages/pyiso/tasks.py", line 15, in get_generation
    data = c.get_generation(**kwargs)
  File "/app/.heroku/python/lib/python2.7/site-packages/pyiso/isone.py", line 61, in get_generation
    raw_data += data['GenFuelMixes']['GenFuelMix']
KeyError: 'GenFuelMixes'