Can you run this in the compiler and get a traceback to determine exactly where the exception happens?