I wonder if we should make this kind of errors more explicit. Dump a traceback in the logs whenever an exception happens.