diff --git a/micropython/senml/senml/senml_record.py b/micropython/senml/senml/senml_record.py index 5c99a447..fe7c56c4 100644 --- a/micropython/senml/senml/senml_record.py +++ b/micropython/senml/senml/senml_record.py @@ -190,7 +190,9 @@ class SenmlRecord(SenmlBase): if ( naming_map["vd"] == "vd" ): # neeed to make a distinction between json (needs base64) and cbor (needs binary) - result[naming_map["vd"]] = base64.b64encode(self._value) + result[naming_map["vd"]] = binascii.b2a_base64(self._value, newline=False).decode( + "utf8" + ) else: result[naming_map["vd"]] = self._value else: