Skip to content

Commit a0e9f38

Browse files
committed
fix: decode bytes to produce a string
With the new JSON library, ``dumps()`` seems to return bytes. Here we decode the output of ``dumps()``, ensuring the output is converted into text. This effectively should address the issue linked below. Resolves: #1352.
1 parent 9c784c9 commit a0e9f38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mriqc/interfaces/webapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ def _run_interface(self, runtime):
163163
| orjson.OPT_APPEND_NEWLINE
164164
| orjson.OPT_SERIALIZE_NUMPY
165165
),
166-
)
167-
Path('payload.json').write_bytes(payload_str)
166+
).decode('utf-8')
167+
Path('payload.json').write_text(payload_str)
168168
self._results['payload_file'] = str(Path('payload.json').absolute())
169169

170170
try:

0 commit comments

Comments
 (0)