merge of #3051 python driver does not handle unicode in errors