WattTime / pyiso

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

keyword argument yesterday does not work #23

Closed mbonvini closed 9 years ago

mbonvini commented 9 years ago

When trying to run this script

from pyiso import client_factory
import pandas as pd

isone = client_factory("ISONE")

data_isone = isone.get_generation(yestarday = True)

I get this error

Traceback (most recent call last):
  File "get_carbon_footprint.py", line 10, in <module>
    data_isone = isone.get_generation(yestarday = True)
  File "/usr/local/lib/python2.7/dist-packages/pyiso/isone.py", line 51, in get_generation
    raise ValueError('Either latest must be True, or start_at and end_at must both be provided.')
ValueError: Either latest must be True, or start_at and end_at must both be provided.

if trying

from pyiso import caiso
ca = caiso.CAISOClient()
ca.get_generation(yesterday = True)

I get

/usr/local/lib/python2.7/dist-packages/pandas/index.so in pandas.index.IndexEngine.get_loc (pandas/index.c:3824)()

/usr/local/lib/python2.7/dist-packages/pandas/index.so in pandas.index.IndexEngine.get_loc (pandas/index.c:3704)()

/usr/local/lib/python2.7/dist-packages/pandas/hashtable.so in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12349)()

/usr/local/lib/python2.7/dist-packages/pandas/hashtable.so in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12300)()

KeyError: 'Hour'
aschn commented 9 years ago

The ISONE problem is now clarified in the docs (http://pyiso.readthedocs.org/en/latest/options.html).