diff --git a/IPython/core/magics/script.py b/IPython/core/magics/script.py index 9fd2fc6..e0615c0 100644 --- a/IPython/core/magics/script.py +++ b/IPython/core/magics/script.py @@ -210,7 +210,7 @@ class ScriptMagics(Magics): async def _handle_stream(stream, stream_arg, file_object): while True: - line = (await stream.readline()).decode("utf8") + line = (await stream.readline()).decode("utf8", errors="replace") if not line: break if stream_arg: