-
Notifications
You must be signed in to change notification settings - Fork 19
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
error when formatting HTTPError #39
Comments
Why is |
python/cpython#98778 discuss that issue. I just re-read that, and realized I can fix this by creating the HTTPError differently (more correctly, I suppose) -raise HTTPError('url', 408, 'timeout', None, None)
+raise HTTPError('url', 408, 'timeout', None, io.BytesIO()) So feel free to close this, unless you really want to do extra work :) |
This is where it crashes: https://github.com/python/cpython/blob/c3c3871415c86088d45abcf73ccd2c2b09dc5772/Lib/tempfile.py#L477 The problem seems to be that |
Closing since this is a Python stdlib issue. |
HTTPError has some weird behavior which causes exceptiongroup to error out when rendering the traceback. There is a cpython issue at python/cpython#98778 about HTTPError's weirdness. But it'd be great if exceptiongroup could help handle this better, so error handling works as expected, and not waiting for a cpython fix and releases.
I found this while using pytest, which uses exceptiongroup.
The setup:
The error:
The text was updated successfully, but these errors were encountered: