PyneCore errors now say what went wrong, and where

When a script fails, PyneCore no longer hands you a Python traceback to decode. Each error a script can cause has its own code and a plain message. It also gives the bar it happened on, the time of that bar, and the line in your source. If the script was run from Pine, that is the Pine line, not the generated Python.

The codes cover the whole path a script takes. 54 of them are run-time errors, such as an array index out of range, a length that ta.sma cannot use, or missing data for request.security. 21 are the rules Pyne code must follow, and 70 belong to the Edge profile checks. Every code has its own entry in the reference docs, with what it means and how to fix it. Old error handlers keep working, because each coded error is still the same kind of Python exception as before.

One more code covers the case where the fault is ours, not yours. If PyneCore itself breaks while running your script, it says so plainly and asks for a report. A bug in the runtime no longer looks like a mistake in your strategy.

This website uses cookies and similar technologies. By continuing to use the site, you accept this. Details in our Privacy Policy.