Changed the `goto fail` to a `return PyErr_NoMemory()`