From ddc14d17fb52bfea926c9e4c904d6e102fafe972 Mon Sep 17 00:00:00 2001 From: david-i-berry Date: Fri, 7 Jul 2023 10:21:09 +0200 Subject: [PATCH] Issue with returning binary, now b64 returned. --- synop2bufr/pygeoapi_plugin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/synop2bufr/pygeoapi_plugin.py b/synop2bufr/pygeoapi_plugin.py index 71075b8..b60104d 100644 --- a/synop2bufr/pygeoapi_plugin.py +++ b/synop2bufr/pygeoapi_plugin.py @@ -136,6 +136,7 @@ def execute(self, data): # and add to single output object bufr = [] for result in bufr_generator: + result['bufr4'] = base64.b64encode( result['bufr4'] ).decode("utf-8") # noqa bufr.append(result) output = {"messages": bufr, "errors": errors} except Exception as e: