--- sipbuild/generator/templates.py.orig	2022-06-17 10:37:06.000000000 -0400
+++ sipbuild/generator/templates.py	2022-06-17 20:40:20.000000000 -0400
@@ -199,7 +199,7 @@
             value = value.replace('::', scope_replacement)
 
         # Perform any replacement.
-        proto_str = proto_str.replace(name, value)
+        proto_str = str(proto_str).replace(name, value)
 
     return proto_str
 
