New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Provides better error message when QUANDL_API_KEY isn't set #2078

Merged
merged 1 commit into from Jan 10, 2018

Conversation

Projects
None yet
3 participants
@ernestoeperez88
Member

ernestoeperez88 commented Jan 9, 2018

Quandl's new API for the WIKI Prices dataset requires an API key.
Omitting the API key when running 'zipline ingest' caused:
HTTPError: HTTP Error 400: Bad Request

The new message asks for QUANDL_API_KEY to be set before
running the ingest process again.

@coveralls

This comment has been minimized.

coveralls commented Jan 9, 2018

Coverage Status

Coverage decreased (-0.03%) to 87.551% when pulling 2306006 on quandl_http_error into 6ffd06b on master.

@ernestoeperez88 ernestoeperez88 requested a review from llllllllll Jan 9, 2018

@@ -105,6 +106,14 @@ def fetch_data_table(api_key,
show_progress=show_progress,
)
except HTTPError as err:
if err.code == 400:

This comment has been minimized.

@llllllllll

llllllllll Jan 9, 2018

Member

Can we just check this condition when we read the QUANDL_API_KEY out of the environment on line 210?

Ernesto Perez
MAINT: Provides better error message when QUANDL_API_KEY is missing
Quandl's new API for the WIKI Prices dataset requires an API key.
Omitting the API key when running 'zipline ingest' would cause:
HTTPError: HTTP Error 400: Bad Request

QUANDL_API_KEY is now checked at the start of the
ingestion process, and an error is raised if its value is 'None'.

@ernestoeperez88 ernestoeperez88 force-pushed the quandl_http_error branch from 2306006 to 63e58f4 Jan 9, 2018

@llllllllll

This comment has been minimized.

Member

llllllllll commented Jan 9, 2018

lgtm, thanks

@coveralls

This comment has been minimized.

coveralls commented Jan 9, 2018

Coverage Status

Coverage decreased (-0.004%) to 87.575% when pulling 63e58f4 on quandl_http_error into 6ffd06b on master.

@ernestoeperez88 ernestoeperez88 merged commit 483dbce into master Jan 10, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ernestoeperez88 ernestoeperez88 deleted the quandl_http_error branch Jan 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment