We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0fca639 + afe5b1c commit 00987a9Copy full SHA for 00987a9
jupyter_client/session.py
@@ -101,15 +101,15 @@ def json_packer(obj):
101
default=json_default,
102
ensure_ascii=False,
103
allow_nan=False,
104
- ).encode("utf8")
+ ).encode("utf8", errors="surrogateescape")
105
except (TypeError, ValueError) as e:
106
# Fallback to trying to clean the json before serializing
107
packed = json.dumps(
108
json_clean(obj),
109
110
111
112
113
114
warnings.warn(
115
f"Message serialization failed with:\n{e}\n"
0 commit comments