From 392f16ccb8a96b4cc6eb74465fdbe61ea0e00041 Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Sun, 28 Aug 2016 21:25:25 +0100 Subject: [PATCH] Properly format type name in error_already_set() --- include/pybind11/cast.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index b4698d816..5783c1a60 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -111,7 +111,7 @@ PYBIND11_NOINLINE inline std::string error_string() { std::string errorString; if (type) { - errorString += (std::string) handle(type).str(); + errorString += handle(type).attr("__name__").cast(); errorString += ": "; } if (value)