From 04d6fef3193c822ddf7263afbbb0a1d4701eb197 Mon Sep 17 00:00:00 2001 From: Ivan Khvostishkov <87804596+ivan-khvostishkov@users.noreply.github.com> Date: Mon, 15 May 2023 18:21:48 +0200 Subject: [PATCH] Fix AttributeError when debugging with threading and 'name' method Effectively prevent this bug: https://youtrack.jetbrains.com/issue/PY-40552 . --- _pydevd_bundle/pydevd_xml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pydevd_bundle/pydevd_xml.py b/_pydevd_bundle/pydevd_xml.py index 5d1ed0fd..0f7cabd3 100644 --- a/_pydevd_bundle/pydevd_xml.py +++ b/_pydevd_bundle/pydevd_xml.py @@ -20,7 +20,7 @@ def make_valid_xml_value(s): # Same thing as xml.sax.saxutils.escape but also escaping double quotes. - return s.replace("&", "&").replace('<', '<').replace('>', '>').replace('"', '"') + return str(s).replace("&", "&").replace('<', '<').replace('>', '>').replace('"', '"') class ExceptionOnEvaluate: