Skip to content

Commit 137eeb2

Browse files
authored
fix proto descriptor decoding (#146)
1 parent d93b451 commit 137eeb2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

memphis/memphis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from threading import Timer
2222
from typing import Callable, Iterable, Union
2323
import uuid
24+
import base64
2425

2526
import graphql
2627
import nats as broker
@@ -427,7 +428,7 @@ def parse_descriptor(self, station_name):
427428
"message_struct_name"
428429
]
429430
desc_set = descriptor_pb2.FileDescriptorSet()
430-
descriptor_bytes = str.encode(descriptor)
431+
descriptor_bytes = base64.b64decode(descriptor)
431432
desc_set.ParseFromString(descriptor_bytes)
432433
pool = descriptor_pool.DescriptorPool()
433434
pool.Add(desc_set.file[0])

0 commit comments

Comments
 (0)