You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make stdout and stderr handle decode errors gracefully (e2b-dev#505)
# Description
The `sbx.commands.run` method can generate a `stdout` with badly encoded
`UTF-8` bytes, which can cause this kind of errors:
```py
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 8191: unexpected end of data
```
see more here:
https://linear.app/e2b/issue/E2B-1291/unicodedecodeerror-in-python-sdk-when-using-curl-command
To address this we update the `decode` error handler to replace with the
unicode replacement char.
# Test
```sh
poetry run pytest -s -n 4 -k "tests/sync/sandbox_sync/commands/test_run"
```
0 commit comments