Skip to content

Conversation

@gcalabria
Copy link

@gcalabria gcalabria commented Jul 31, 2024

Closes #721

@cla-bot
Copy link

cla-bot bot commented Jul 31, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Guilherme Calabria Lopes.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

return obj.dict()
if isinstance(obj, Send):
return {"node": obj.node, "arg": obj.arg}
return super().default(obj)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of super without a class context is a bug here. Can we give the default serializer more powers to allow any object to be become json serializable?

Suggested change
return super().default(obj)
try:
return obj.__dict__()
except:
pass
raise TypeError(f"Object of type {obj.__class__.__name__} is not JSON serializable")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: TypeError: Type is not JSON serializable: Send

2 participants