question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not supported proxy scheme error

See original GitHub issue

I am conecting to the internet through a proxy server. I used the below code to send a HTTP GET request using requests library in python.

import requests
 from requests.auth import HTTPProxyAuth
 
 url = "http://httpbin.org/get" 
 proxies = {"http":"my-proxy-server: port"}
 auth = HTTPProxyAuth("username", "password")
 r = requests.get(url, proxies=proxies, auth=auth)
 print r

but It gives me the following error

Traceback (most recent call last):
   File "D:\python_http_req.py", line 7, in <module>
     r = requests.get(url, proxies=proxies, auth=auth)
   File "C:\Python27\lib\site-packages\requests\api.py", line 72, in get
     return request('get', url, params=params, **kwargs)
   File "C:\Python27\lib\site-packages\requests\api.py", line 58, in request
     return session.request(method=method, url=url, **kwargs)
   File "C:\Python27\lib\site-packages\requests\sessions.py", line 512, in request
     resp = self.send(prep, **send_kwargs)
   File "C:\Python27\lib\site-packages\requests\sessions.py", line 622, in send
     r = adapter.send(request, **kwargs)
   File "C:\Python27\lib\site-packages\requests\adapters.py", line 410, in send
     conn = self.get_connection(request.url, proxies)
   File "C:\Python27\lib\site-packages\requests\adapters.py", line 308, in get_connection
     proxy_manager = self.proxy_manager_for(proxy)
   File "C:\Python27\lib\site-packages\requests\adapters.py", line 198, in proxy_manager_for
     **proxy_kwargs)
   File "C:\Python27\lib\site-packages\urllib3\poolmanager.py", line 449, in proxy_from_url
     return ProxyManager(proxy_url=url, **kw)
   File "C:\Python27\lib\site-packages\urllib3\poolmanager.py", line 400, in __init__
     raise ProxySchemeUnknown(proxy.scheme)
 ProxySchemeUnknown: Not supported proxy scheme my-proxy-server

can anybody help me to resolve this error?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

5reactions
samiashton1989commented, Dec 16, 2019

from requests.auth import HTTPProxyAuth proxyDict = { ‘http’ : ‘http://138.197.222.35:80’, ‘https’ : ‘http://1138.197.222.35:8080’ } #auth = HTTPProxyAuth(‘username’, ‘mypassword’) r = requests.get(‘http://httpbin.org/ip’, proxies=proxyDict) print ®

0reactions
1UC1F3R616commented, Apr 27, 2020

@oshadaamila This issue is resolved with solution by @samiashton1989 Consider it closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip, proxy authentication and "Not supported proxy scheme"
This is complaining about the scheme for the URL (which urlparse is understanding to be myusr ), to work around that you should...
Read more >
ProxySchemeUnknown('Not supported proxy scheme proxy-au',)
Cause. These errors can occur when the firewall is blocking access to the Anaconda library where the Python environment is stored. Solution ...
Read more >
Assertion error: Not supported proxy ... - JetBrains YouTrack
Currently "pip –proxy=user:password@proxy_ip:proxy_port install package_name" this command will produce the following error "AssertionError: Not supported ...
Read more >
Trying to use proxies to scrape amazon with requests. Getting ...
Trying to use proxies to scrape amazon with requests. Getting this error: urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme None.
Read more >
pip, proxy authentication and "Not supported proxy scheme"
Answer a question Trying to install pip on a new python installation. I am stuck with proxy errors. Looks like a bug in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found