You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue you're encountering is related to how the requests library handles malformed URLs when making requests through a proxy. Specifically, the AssertionError is being raised because the URL contains invalid characters (in this case, %C2%A0, which is a non-breaking space encoded in UTF-8).
`
By properly encoding the URL and handling potential errors, you can avoid the AssertionError and make your code more robust when dealing with malformed URLs through a proxy.
Unsure whether this is the right place to handle this error – happy to report this elsewhere if you disagree.
When opening a request with a malformed URL through a proxy, an AssertionError from deep in the http library is reported.
Expected Result
ConnectionError
,NameResolutionError
or something more indicative of what the problem isActual Result
AssertionError: b''
Reproduction Steps
System Information
The text was updated successfully, but these errors were encountered: