WattTime / pyiso

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

Catch error when CAISO today's renewables has no content #74

Closed aschn closed 8 years ago

aschn commented 8 years ago

Args {"market": "RT5M", "latest": true} at 2016-06-10 10:32:00.084118+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/caiso.py", line 92, in get_generation
    return self._generation_latest()
  File "/app/.heroku/python/lib/python2.7/site-packages/pyiso/caiso.py", line 752, in _generation_latest
    soup = self.fetch_todays_outlook_renewables()
  File "/app/.heroku/python/lib/python2.7/site-packages/pyiso/caiso.py", line 708, in fetch_todays_outlook_renewables
    return BeautifulSoup(response.content)
AttributeError: 'NoneType' object has no attribute 'content'