Skip to content

Commit 421fdba

Browse files
authored
Allow parsing of messages from ByteStrings #266
2 parents ad8b917 + fb2793e commit 421fdba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/betterproto/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ def _postprocess_single(
866866
value = struct.unpack(fmt, value)[0]
867867
elif wire_type == WIRE_LEN_DELIM:
868868
if meta.proto_type == TYPE_STRING:
869-
value = value.decode("utf-8")
869+
value = str(value, "utf-8")
870870
elif meta.proto_type == TYPE_MESSAGE:
871871
cls = self._betterproto.cls_by_field[field_name]
872872

0 commit comments

Comments
 (0)