From f89b5a5d90d7b45a7f59dbd2bb29ae2f400aba44 Mon Sep 17 00:00:00 2001 From: sh1buy Date: Sat, 11 Apr 2015 00:23:07 +0300 Subject: [PATCH] fix bug 2540 --- requests/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests/models.py b/requests/models.py index 806004c0..869a9424 100644 --- a/requests/models.py +++ b/requests/models.py @@ -358,7 +358,7 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin): if not scheme: raise MissingSchema("Invalid URL {0!r}: No schema supplied. " - "Perhaps you meant http://{0}?".format(url)) + "Perhaps you meant http://{0}?".format(url.encode('utf8'))) if not host: raise InvalidURL("Invalid URL %r: No host supplied" % url)