instead of calling PyErr_Clear(). Add checking of those errors.
Attach a file by drag & drop or click to upload