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

Unclosed socket warning sys:1: ResourceWarning: unclosed <socket.socket... #1416

Open
michalszelagsonos opened this issue Nov 16, 2024 · 0 comments

Comments

@michalszelagsonos
Copy link

michalszelagsonos commented Nov 16, 2024

I am consistently seeing the following warning when using 4.9.3 client with Python 3.12.7 on M1 MacOS 14.7.

sys:1: ResourceWarning: unclosed <socket.socket fd=15, family=2, type=1, proto=6, laddr=('127.0.0.1', 63214), raddr=('127.0.0.1', 11434)>

I am running the DB locally using docker. The image I am running is based on cr.weaviate.io/semitechnologies/weaviate:1.27.2 and has pre-populated data in it.

docker run -p 8080:8080 -p 50051:50051 -e RAFT_ENABLE_ONE_NODE_RECOVERY=true weaviate-with-data:latest

Here's my very simple client code.

import weaviate
import ollama

with weaviate.connect_to_local() as client:
    # get the collection
    collection = client.collections.get(name="foo")

    # get the embedding
    response = ollama.embeddings(model="all-minilm", prompt="bla bla bla")

    # find a vector
    result = collection.query.near_vector(near_vector=response["embedding"], limit=1)

This seems to be the same warning that was reported 2 years ago in #126 on an older version.

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

No branches or pull requests

1 participant