From 77e4c0579850c7e4c8691e646be1dd2e3307fc43 Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Sat, 13 Apr 2024 20:40:08 +0200
Subject: [PATCH] dd4hep_base: also convert bytes to str

---
 DDCore/python/dd4hep_base.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/DDCore/python/dd4hep_base.py b/DDCore/python/dd4hep_base.py
index 3d5073c8d..a62f0542c 100644
--- a/DDCore/python/dd4hep_base.py
+++ b/DDCore/python/dd4hep_base.py
@@ -118,6 +118,8 @@ def unicode_2_string(value):
     value = value
   elif isinstance(value, six.string_types):
     value = str(value)
+  elif isinstance(value, bytes):
+    value = value.decode()
   elif isinstance(value, (list, set, tuple)):
     value = [unicode_2_string(x) for x in value]
   elif isinstance(value, dict):
-- 
GitLab