From f02d0f9e79a3aa3f0b716871f457ceb8f446bdba Mon Sep 17 00:00:00 2001 From: sh1buy Date: Sat, 11 Apr 2015 01:41:02 +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 869a9424..545c5257 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.encode('utf8'))) + "Perhaps you meant http://{0}?".format(to_native_string(url,encoding='utf8'))) if not host: raise InvalidURL("Invalid URL %r: No host supplied" % url)