diff --git a/capnp/lib/capnp.pyx b/capnp/lib/capnp.pyx index 2439f1a8a..a6eddb0f3 100644 --- a/capnp/lib/capnp.pyx +++ b/capnp/lib/capnp.pyx @@ -1738,8 +1738,8 @@ cdef class _DynamicStructBuilder: def from_dict(self, dict d): for key, val in d.iteritems(): if key != 'which': - field = self.schema.fields.get(key) if isinstance(val, str): + field = self.schema.fields.get(key) dtype = field.proto.slot.type.which() if dtype == "data": # decode bytes from utf-8 base64 encoding