Skip to content
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

ernestoeperez88
Copy link

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
Copy link

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.

@@ -105,6 +106,14 @@ def fetch_data_table(api_key,
show_progress=show_progress,
)

except HTTPError as err:
if err.code == 400:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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'.
@llllllllll
Copy link
Contributor

lgtm, thanks

@coveralls
Copy link

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
@ernestoeperez88 ernestoeperez88 deleted the quandl_http_error branch January 10, 2018 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants