error is: "PyCapsule_GetPointer called with incorrect name" patch taken from: https://issues.qgis.org/issues/19476