-
-
Notifications
You must be signed in to change notification settings - Fork 314
Description
If using a builtin process manager, such as the tinydb, mongo or postgresql ones, which all delegate to the base manager's _execute_handler_sync() at some point, when an executing process generates bytes as its output, the process manager converts it to a UTF-8 string, as seen in:
pygeoapi/pygeoapi/process/manager/base.py
Lines 280 to 281 in b9e81dd
| if isinstance(outputs, bytes): | |
| outputs = outputs.decode('utf-8') |
I guess this means that support for binary output types (for example, a geotiff file) is now broken?
Further down in the same method, there is still a check for bytes, as per:
pygeoapi/pygeoapi/process/manager/base.py
Lines 301 to 304 in b9e81dd
| elif isinstance(outputs, bytes): | |
| mode = 'wb' | |
| data = outputs | |
| encoding = None |
but the code inside this if condition is now not reachable, because the type of outputs has been modified to a str above.
@tomkralidis this seems like a regression introduced in this recent change: 0b53d49