← mined_oracle

requests_6036

failed WRONG_FIX UNSUBMITTED wrong_fix_unsubmitted(None) · None tool calls · 0 s · psf/requests

Task input

(not found in data/tasks.jsonl)

Tool calls (0)

#ToolArgumentsResult
No trace captured.

Patch

--- a/requests/exceptions.py
+++ b/requests/exceptions.py
@@ -34,6 +34,16 @@ class InvalidJSONError(RequestException):
 class JSONDecodeError(InvalidJSONError, CompatJSONDecodeError):
     """Couldn't decode the text into json"""
 
+    def __init__(self, *args, **kwargs):
+        """
+        Construct the JSONDecodeError instance first with all
+        args. Then use it's args to construct the IOError so that
+        the json specific args aren't used as IOError specific args
+        and the error message from JSONDecodeError is preserved.
+        """
+        CompatJSONDecodeError.__init__(self, *args)
+        InvalidJSONError.__init__(self, *self.args, **kwargs)
+
 
 class HTTPError(RequestException):
     """An HTTP error occurred."""

Test output

show
[2026-09-23 20:55:10,482] WARNING in core: flasgger is not installed; serving the static landing page at / and skipping the Swagger UI and /spec.json.
ImportError while loading conftest '/private/tmp/swe_work/mined_oracle/requests_6036/b/workspace/tests/conftest.py'.
tests/__init__.py:8: in <module>
    from urllib3.exceptions import SNIMissingWarning
E   ImportError: cannot import name 'SNIMissingWarning' from 'urllib3.exceptions' (/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/requests/lib/python3.13/site-packages/urllib3/exceptions.py)