philsv / myeia

Python wrapper for the U.S. Energy Information Administration (EIA) API v2

Home Page:https://pypi.org/project/myeia/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

First example throws error

rbonallo opened this issue · comments

Hi, I was just trying the first example you have and I get an error:

HTTPError: 400 Client Error: Bad Request for url: https://api.eia.gov/v2/natural-gas/pri/fut/data/?api_key=c4wW96H5wHjJf0C9RKda6nseO5gjZV8VqHz8zdzB&data%5B%5D=value&frequency=daily&start=1963-09-23&end=2073-08-26&facets%5BNone%5D%5B%5D=RNGC1&sort%5B0%5D%5Bcolumn%5D=period&sort%5B0%5D%5Bdirection%5D=desc

{"error":"Invalid facet 'None' provided. The only valid facets are 'duoarea', 'product', 'process', and 'series'.","code":400}.

The second works fine. Just FYI. Cheers.

Your documentation is also out of date, start parameter is now start_date etc.

seriesId -> series

Thank you for noticing! Fixed it now in 0.3.5.

pip install --upgrade myeia

No problem, cheers!