The original was generating an exception message and, after aliasing,
calling PyBytes_AsString on a unicode string -> error. It was also
leaking references, although that probably didn't matter in context.
The fix here is on the cheap side, just use a C string for the message
without including the extra information about the erroneous type that
led to the exception.
No test, I don't know how to evoke this error.