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

Failed to connect to cloud when running on my local machine but working in google colab. #762

Open
wanjeakshay opened this issue Aug 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@wanjeakshay
Copy link

Current Behavior

Steps to Reproduce

pip install qdrant-client

from qdrant_client import QdrantClient

qdrant_client = QdrantClient(
url="https://***************3dc70dbfa.europe-west3-0.gcp.cloud.qdrant.io:6333",
api_key="*************wlFKJ4OmI0e39uTaU9MuDAVc6OLWt-HpXaEdw",
)

print(qdrant_client.get_collections())

This is giving me following error.

Traceback (most recent call last):
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpx_transports\default.py", line 72, in map_httpcore_exceptions
yield
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpx_transports\default.py", line 236, in handle_request
resp = self._pool.handle_request(req)
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpcore_sync\connection_pool.py", line 216, in handle_request
raise exc from None
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpcore_sync\connection_pool.py", line 196, in handle_request
response = connection.handle_request(
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpcore_sync\connection.py", line 99, in handle_request
raise exc
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpcore_sync\connection.py", line 76, in handle_request
stream = self._connect(request)
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpcore_sync\connection.py", line 122, in _connect
stream = self._network_backend.connect_tcp(**kwargs)
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpcore_backends\sync.py", line 213, in connect_tcp
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
File "c:\python 3.9\lib\contextlib.py", line 135, in exit
self.gen.throw(type, value, traceback)
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectError: [Errno 11001] getaddrinfo failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\qdrant_client\http\api_client.py", line 106, in send_inner
response = self._client.send(request)
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpx_client.py", line 926, in send
response = self._send_handling_auth(
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpx_client.py", line 954, in _send_handling_auth
response = self._send_handling_redirects(
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpx_client.py", line 991, in _send_handling_redirects
response = self._send_single_request(request)
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpx_client.py", line 1027, in _send_single_request
response = transport.handle_request(request)
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpx_transports\default.py", line 236, in handle_request
resp = self._pool.handle_request(req)
File "c:\python 3.9\lib\contextlib.py", line 135, in exit
self.gen.throw(type, value, traceback)
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\httpx_transports\default.py", line 89, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\NibusNext\Qdrant_vectorDB\main.py", line 15, in
print(qdrant_client.get_collections())
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\qdrant_client\qdrant_client.py", line 1931, in get_collections
return self._client.get_collections(**kwargs)
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\qdrant_client\qdrant_remote.py", line 2423, in get_collections
self.http.collections_api.get_collections().result
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\qdrant_client\http\api\collections_api.py", line 1335, in get_collections
return self._build_for_get_collections()
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\qdrant_client\http\api\collections_api.py", line 432, in build_for_get_collections
return self.api_client.request(
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\qdrant_client\http\api_client.py", line 79, in request
return self.send(request, type
)
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\qdrant_client\http\api_client.py", line 96, in send
response = self.middleware(request, self.send_inner)
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\qdrant_client\http\api_client.py", line 205, in call
return call_next(request)
File "D:\NibusNext\Qdrant_vectorDB\env\lib\site-packages\qdrant_client\http\api_client.py", line 108, in send_inner
raise ResponseHandlingException(e)
qdrant_client.http.exceptions.ResponseHandlingException: [Errno 11001] getaddrinfo failed

But this code is working fine in google colab.

@wanjeakshay wanjeakshay added the bug Something isn't working label Aug 29, 2024
@timvisee timvisee transferred this issue from qdrant/qdrant Aug 30, 2024
@joein
Copy link
Member

joein commented Sep 2, 2024

@wanjeakshay hi

it seems that you might have some problems with DNS or maybe you're using some proxy, the error is about not being able to resolve an address

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants