{"action":"closed","issue":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/2846","labels_url":"https://api.github.com/repos/kennethreitz/requests/issues/2846/labels{/name}","comments_url":"https://api.github.com/repos/kennethreitz/requests/issues/2846/comments","events_url":"https://api.github.com/repos/kennethreitz/requests/issues/2846/events","html_url":"https://github.com/kennethreitz/requests/issues/2846","id":113267959,"number":2846,"title":"HTTP PROXY password contains '#' failed to connect","user":{"login":"bonfy","id":3996876,"avatar_url":"https://avatars.githubusercontent.com/u/3996876?v=3","gravatar_id":"","url":"https://api.github.com/users/bonfy","html_url":"https://github.com/bonfy","followers_url":"https://api.github.com/users/bonfy/followers","following_url":"https://api.github.com/users/bonfy/following{/other_user}","gists_url":"https://api.github.com/users/bonfy/gists{/gist_id}","starred_url":"https://api.github.com/users/bonfy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonfy/subscriptions","organizations_url":"https://api.github.com/users/bonfy/orgs","repos_url":"https://api.github.com/users/bonfy/repos","events_url":"https://api.github.com/users/bonfy/events{/privacy}","received_events_url":"https://api.github.com/users/bonfy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-26T01:15:04Z","updated_at":"2015-10-26T02:01:59Z","closed_at":"2015-10-26T02:01:59Z","body":"```python\r\nimport requests\r\n\r\nPROXIES = {\r\n    'http':'http://{usr}:{pwd}@proxy:port'.format(usr = 'XXX',pwd = 'XXX#XXX'),\r\n}\r\n\r\nurl = 'http://www.sina.com'\r\nr = requests.get(url, proxies = PROXIES)\r\nprint r.text\r\n```\r\n\r\nwith error :\r\nTraceback (most recent call last):\r\n  File \"autohome.py\", line 11, in <module>\r\n    r = requests.get(url, proxies = PROXIES)\r\n  File \"C:\\Python27\\lib\\site-packages\\requests-2.2.1-py2.7.egg\\requests\\api.py\",\r\n line 55, in get\r\n    return request('get', url, **kwargs)\r\n  File \"C:\\Python27\\lib\\site-packages\\requests-2.2.1-py2.7.egg\\requests\\api.py\",\r\n line 44, in request\r\n    return session.request(method=method, url=url, **kwargs)\r\n  File \"C:\\Python27\\lib\\site-packages\\requests-2.2.1-py2.7.egg\\requests\\sessions\r\n.py\", line 383, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n  File \"C:\\Python27\\lib\\site-packages\\requests-2.2.1-py2.7.egg\\requests\\sessions\r\n.py\", line 486, in send\r\n    r = adapter.send(request, **kwargs)\r\n  File \"C:\\Python27\\lib\\site-packages\\requests-2.2.1-py2.7.egg\\requests\\adapters\r\n.py\", line 305, in send\r\n    conn = self.get_connection(request.url, proxies)\r\n  File \"C:\\Python27\\lib\\site-packages\\requests-2.2.1-py2.7.egg\\requests\\adapters\r\n.py\", line 215, in get_connection\r\n    block=self._pool_block)\r\n  File \"C:\\Python27\\lib\\site-packages\\requests-2.2.1-py2.7.egg\\requests\\packages\r\n\\urllib3\\poolmanager.py\", line 258, in proxy_from_url\r\n    return ProxyManager(proxy_url=url, **kw)\r\n  File \"C:\\Python27\\lib\\site-packages\\requests-2.2.1-py2.7.egg\\requests\\packages\r\n\\urllib3\\poolmanager.py\", line 207, in __init__\r\n    proxy = parse_url(proxy_url)\r\n  File \"C:\\Python27\\lib\\site-packages\\requests-2.2.1-py2.7.egg\\requests\\packages\r\n\\urllib3\\util.py\", line 397, in parse_url\r\n    raise LocationParseError(\"Failed to parse: %s\" % url)\r\nrequests.packages.urllib3.exceptions.LocationParseError: Failed to parse: Failed\r\n to parse: XXX:XXX\r\n\r\nthe password after '#' missed and can not connect to the proxy server\r\n"}}