pytdb: Check errors after PyObject_New() calls