From c45bfb1e3595b3f776fbb2cfc4bf63afaae195c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Mon, 9 Nov 2020 18:28:58 +0100 Subject: [PATCH] Cast the record message to str() before extracting. --- src/runner/pylogger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runner/pylogger.cpp b/src/runner/pylogger.cpp index 111f571..3eb4c31 100644 --- a/src/runner/pylogger.cpp +++ b/src/runner/pylogger.cpp @@ -23,7 +23,7 @@ void emit_function(bpy::object self, bpy::object record) { // There are other parameters that could be used, but this is minimal for // now (filename, line number, etc.). const int level = bpy::extract(record.attr("levelno")); - const std::wstring msg = bpy::extract(record.attr("msg")); + const std::wstring msg = bpy::extract(bpy::str(record.attr("msg"))); switch (level) { case PyLogLevel::CRITICAL: