Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Errors with insufficient information

When Quantopian fails while executing an algorithm, it seems to tell me the line number for the bottom of the execution stack rather than the top. This is not helpful for tracking down errors. Has anyone else experienced this? And if so what debugging strategies do you use? Re-running a backtest is far from efficient, so trial and error is hardly a viable approach.

Thanks,

Sunil

1 response

In the interest of being more specific, here's the error I get:


KeyError: Equity(8941, symbol=u'CWEI', asset_name=u'CLAYTON WILLIAMS ENERGY INC', exchange=u'NEW YORK STOCK EXCHANGE', start_date=Timestamp('1993-05-20 00:00:00+0000', tz='UTC'), end_date=Timestamp('2016-03-04 00:00:00+0000', tz='UTC'), first_traded=None, auto_close_date=Timestamp('2016-03-09 00:00:00+0000', tz='UTC'))  
There was a runtime error on line 629.  

There are two things that trip me up here:

  1. Line 629 is a function call, so the actual error is elsewhere in my code.
  2. As far as I can tell I am only accessing the symbol property on stocks. Is there any reason why I would not be able to access the symbol here? This error happens a long way into my backtest, so it is unlikely that this is a line of code that is otherwise not being executed.

Thanks,

Sunil