Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update python docker dependency to 7.1.0 to fix 'Not supported URL scheme http+docker' exception #543

Closed
wants to merge 1 commit into from

Conversation

alexklibisz
Copy link
Contributor

When running on Ubuntu 22.04 LTS with 3.10.8, I'm seeing an error like below. Upgrading to the latest version of the docker library makes the error go away.

Traceback (most recent call last):                                                                                                                                                                                                                                                                                                                                         
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/requests/adapters.py", line 633, in send                                                                                                                                                                                                                                    
    conn = self.get_connection_with_tls_context(                                                                                                                                                                                                                                                                                                                           
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/requests/adapters.py", line 489, in get_connection_with_tls_context                                                                                                                                                                                                         
    conn = self.poolmanager.connection_from_host(                                                                                                                                                                                                                                                                                                                          
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/urllib3/poolmanager.py", line 303, in connection_from_host                                                                                                                                                                                                                  
    return self.connection_from_context(request_context)                                                                                                                                                                                                                                                                                                                   
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/urllib3/poolmanager.py", line 325, in connection_from_context                                                                                                                                                                                                               
    raise URLSchemeUnknown(scheme)                                                                                                                                                                                                                                                                                                                                         
urllib3.exceptions.URLSchemeUnknown: Not supported URL scheme http+docker                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                           
During handling of the above exception, another exception occurred:                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                           
Traceback (most recent call last):                                                                                                                                                                                                                                                                                                                                         
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/docker/api/client.py", line 214, in _retrieve_server_version                                                                                                                                                                                                                
    return self.version(api_version=False)["ApiVersion"]                                                                                                                                                                                                                                                                                                                   
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/docker/api/daemon.py", line 181, in version                                                                                                                                                                                                                                 
    return self._result(self._get(url), json=True)                                                                                                                                                                                                                                                                                                                         
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/docker/utils/decorators.py", line 46, in inner                                                                                                                                                                                                                              
    return f(self, *args, **kwargs)                                                                                                                                                                                                                                                                                                                                        
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/docker/api/client.py", line 237, in _get                                                                                                                                                                                                                                    
    return self.get(url, **self._set_request_timeout(kwargs))                                                                                                                                                                                                                                                                                                              
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/requests/sessions.py", line 602, in get                                                                                                                                                                                                                                     
    return self.request("GET", url, **kwargs)                                                                                                                                                                                                                                                                                                                              
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/requests/sessions.py", line 589, in request                                                                                                                                                                                                                                 
    resp = self.send(prep, **send_kwargs)                                                                                                                                                                                                                                                                                                                                  
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/requests/sessions.py", line 703, in send                                                                                                                                                                                                                                    
    r = adapter.send(request, **kwargs)                                                                                                                                                                                                                                                                                                                                    
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/requests/adapters.py", line 637, in send                                                                                                                                                                                                                                    
    raise InvalidURL(e, request=request)                                                                                                                                                                                                                                                                                                                                   
requests.exceptions.InvalidURL: Not supported URL scheme http+docker                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                                                           
During handling of the above exception, another exception occurred:                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                           
Traceback (most recent call last):                                                                                                                                                                                                                                                                                                                                         
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/run.py", line 7, in <module>                                                                                                                                                                                                                                                                                  
    main()                                                                                                                                                                                                                                                                                                                                                                 
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/ann_benchmarks/main.py", line 331, in main                                                                                                                                                                                                                                                                    
    definitions = filter_by_available_docker_images(definitions)
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/ann_benchmarks/main.py", line 189, in filter_by_available_docker_images
    docker_client = docker.from_env()
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/docker/client.py", line 96, in from_env
    return cls(
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/docker/client.py", line 45, in __init__
    self.api = APIClient(*args, **kwargs)
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/docker/api/client.py", line 197, in __init__
    self._version = self._retrieve_server_version()
  File "/home/ubuntu/elastiknn/ann-benchmarks/ann-benchmarks/venv/lib/python3.10/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: Not supported URL scheme http+docker

@maumueller
Copy link
Collaborator

Closing this because it is part of #544

@maumueller maumueller closed this Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants