-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot convert None of type <class 'NoneType'> to bytes (in formatting middleware?) #2546
Comments
Hey @nullp0tr, it looks like the call response has a I would review a PR that looks for if "result" in response and response["result"] is not None and method in result_formatters ... with a similar change applied to the error formatters lines directly below it and ideally adds some appropriate tests around the I do think this would more broadly only attempt formatting a response or error if the value was present. In your case, since this seems to be only when there is a If you or someone else doesn't get to it soon enough I think one of us can come by and add this PR soon. I'll leave this open for now so we can track it. |
Hi @fselmo thanks a lot for the feedback, I'll see if I can write a test case for this to facilitate a PR 🙏 |
@nullp0tr Any time! Let us know if you need any help. I'd be happy to collaborate on adding some tests too. |
pip freeze
outputWhat was wrong?
on a company project we're getting the following error once every few moons
unfortunately we haven't managed to find code to reproduce this issue consistently, it just happens sometimes on a pretty standard
call
that we issue quite often and that almost always succeeds. any pointers would be appreciated !The text was updated successfully, but these errors were encountered: