1

Trying to figure out how to handle the error:

quandl.errors.quandl_error.NotFoundError: (Status 404) (Quandl Error QECx02) You have submitted an incorrect Quandl code. Please check your Quandl codes and try again. 

Here's a snippet of the code that I would want the exception on:

 source = Q.get(query_site, authtoken=secret) df = df.join(source, how='outer') 

I would want to break out if I get the error. What would be with my except statement? I tried NotFoundError but it did not seem to work.

2
  • Not sure if this is a correct solution but it seemed to work. I first imported quandl.errors.quandl_error. After importing the module, the NotFoundError worked as an exception. If anyone can verify this that would be great. Commented Jul 1, 2016 at 16:04
  • don't think this import works. Commented May 25, 2017 at 14:10

1 Answer 1

1

Handling the NotFoundError

from quandl.errors.quandl_error import NotFoundError try: source = Q.get(query_site, authtoken=secret) df = df.join(source, how='outer') except NotFoundError as e: print('error: {} '.format(str(e))) 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.