Skip to content

Commit

Permalink
Merge pull request #752 from martinRenou/json_packer_handle_typeerror
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Mar 7, 2022
2 parents b450496 + def9a74 commit c5c0b80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jupyter_client/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def json_packer(obj):
ensure_ascii=False,
allow_nan=False,
).encode("utf8")
except ValueError as e:
except (TypeError, ValueError) as e:
# Fallback to trying to clean the json before serializing
packed = json.dumps(
json_clean(obj),
Expand Down

0 comments on commit c5c0b80

Please sign in to comment.