# GetBuilder Error

**URL:** <https://forum.weaviate.io/t/getbuilder-error/2672>\
**Category:** Support\
**Created:** [June 10, 2024, 2:31pm UTC](https://forum.weaviate.io/t/getbuilder-error/2672 "2024-06-10T14:31:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hamza\_Rezgui](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/hamza_rezgui/32/1712_2.png) [@Hamza\_Rezgui](https://forum.weaviate.io/u/Hamza_Rezgui)\
**Post date:** [June 10, 2024, 2:31pm UTC](https://forum.weaviate.io/t/getbuilder-error/2672/1 "2024-06-10T14:31:33Z")

</div>

### Description

Im experimenting with the vector similarity search specifically search with a vector and i got this error on my console :

> {“error”:“‘GetBuilder’ object has no attribute ‘with\_additional’”}

What is the root cause for this issue and how can i fix it

This is the schema that i defined and the function that runs it

```auto
def create_schema():
    schema = {
        "classes": [
            {
                "class": "Embeddings",
                "vectorizer": "none", 
                "properties": [
                    {
                        "name": "chunk",
                        "dataType": ["text"]
                    }
                ]
            }
        ]
    }
    client.schema.create(schema)

```

and this is the endpoint that saves the vectors in the weaviate db

```auto
def save_vectorstore(chunks):
    try:
        embeddings_model = pipeline('feature-extraction', model='bert-base-uncased')
        for chunk in chunks:
            embeddings = embeddings_model(chunk)
            vector = embeddings[0][0]
            data_object = {
                "text": chunk
            }
            client.data_object.create(class_name="Embeddings", data_object=data_object, vector=vector)
        return {"message": "Vector store saved successfully"}
    except Exception as e:
        return {'error': str(e)}

```

Thanks for your help in advance !!!

### Additional Information

What im trying to build is a vector database that contains vectors from chunks of text that i got from my document(s), im using it in a chatapp to figure out from a user’s prompt what to reply with for the assistant that im using; I don’t know if i got the schema right and if there any suggestions to improve it for this case I’ll appreciate it.

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [June 10, 2024, 6:34pm UTC](https://forum.weaviate.io/t/getbuilder-error/2672/2 "2024-06-10T18:34:22Z")

</div>

hi @Hamza_Rezgui !!

Welcome to our community 🤗

Any reason why you are using python v3? Python v4 is way better. Not only on the syntax, but specially in performance.

let me know if you need help on migrating to pyv4.  
here we have a guide that cover this migration:

> **[Migrate from v3 to v4 | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/client-libraries/python/v3_v4_migration)**
>
> The current Python client version is v||site.pythonclientversion||

This error message doesn’t seems related to inserting objects, but querying. `GetBuilder`

Can you paste the full traceback of this error?

Thanks!

---

<div class="post-metadata">

**Author:** ![Hamza\_Rezgui](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/hamza_rezgui/32/1712_2.png) [@Hamza\_Rezgui](https://forum.weaviate.io/u/Hamza_Rezgui)\
**Post date:** [June 10, 2024, 8:52pm UTC](https://forum.weaviate.io/t/getbuilder-error/2672/3 "2024-06-10T20:52:48Z")

</div>

Hi @DudaNogueira , So i tried migrating to v4 and im using a docker container, i instanciated the client with  
client = weaviate.connect\_to\_local()  
and i got this whole block of error

> Traceback (most recent call last):  
> File “/usr/src/app/venv/bin/flask”, line 8, in   
> sys.exit(main())  
> ^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/flask/cli.py”, line 1105, in main  
> cli.main()  
> File “/usr/src/app/venv/lib/python3.11/site-packages/click/core.py”, line 1078, in main  
> rv = self.invoke(ctx)  
> ^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/click/core.py”, line 1688, in invoke  
> return \_process\_result(sub\_ctx.command.invoke(sub\_ctx))  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/click/core.py”, line 1434, in invoke  
> return ctx.invoke(self.callback, \*\*ctx.params)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/click/core.py”, line 783, in invoke  
> return \_\_callback(\*args, \*\*kwargs)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/click/decorators.py”, line 92, in new\_func  
> return ctx.invoke(f, obj, \*args, \*\*kwargs)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/click/core.py”, line 783, in invoke  
> return \_\_callback(\*args, \*\*kwargs)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/flask/cli.py”, line 953, in run\_command  
> raise e from None  
> File “/usr/src/app/venv/lib/python3.11/site-packages/flask/cli.py”, line 937, in run\_command  
> app: WSGIApplication = info.load\_app()  
> ^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/flask/cli.py”, line 335, in load\_app  
> app = locate\_app(import\_name, name)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/flask/cli.py”, line 245, in locate\_app  
> **import** (module\_name)  
> File “/usr/src/app/app.py”, line 2, in   
> from endpoints import endpoints\_bp  
> File “/usr/src/app/endpoints.py”, line 2, in   
> from utils import extract\_text, save\_vectorstore, similarity\_search  
> File “/usr/src/app/utils.py”, line 12, in   
> client = weaviate.connect\_to\_local()  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/weaviate/connect/helpers.py”, line 213, in connect\_to\_local  
> return \_\_connect(client)  
> ^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/weaviate/connect/helpers.py”, line 401, in \_\_connect  
> raise e  
> File “/usr/src/app/venv/lib/python3.11/site-packages/weaviate/connect/helpers.py”, line 397, in \_\_connect  
> client.connect()  
> File “/usr/src/app/venv/lib/python3.11/site-packages/weaviate/client.py”, line 287, in connect  
> self.\_connection.connect(self.\_\_skip\_init\_checks)  
> File “/usr/src/app/venv/lib/python3.11/site-packages/weaviate/connect/v4.py”, line 711, in connect  
> super().connect(skip\_init\_checks)  
> File “/usr/src/app/venv/lib/python3.11/site-packages/weaviate/connect/v4.py”, line 138, in connect  
> self.\_create\_clients(self.\_auth, skip\_init\_checks)  
> File “/usr/src/app/venv/lib/python3.11/site-packages/weaviate/connect/v4.py”, line 260, in \_create\_clients  
> raise WeaviateConnectionError(  
> weaviate.exceptions.WeaviateConnectionError: Connection to Weaviate failed. Error: [Errno 111] Connection refused.  
> Is Weaviate running and reachable at [http://localhost:8080](http://localhost:8080)?

i just want to know how can i instantiate it exactly while using docker and thank you  
ps : when i access localhost:8080/v1, it gives me all these documentation hrefs but nothing when the path is just localhost:8080.

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [June 10, 2024, 10:36pm UTC](https://forum.weaviate.io/t/getbuilder-error/2672/4 "2024-06-10T22:36:06Z")

</div>

hi @Hamza_Rezgui !

Is your application running side by side by the Weaviate server inside docker?

If that’s the case, you need to point your client like so:

```auto
client = weaviate.connect_to_local(host="weaviate")

```

_edit: host should be a string._

Otherwise the python client will try to connect on it’s own cluster, where there is no Weaviate server running.

Let me know if this helps!

THanks!

---

<div class="post-metadata">

**Author:** ![Hamza\_Rezgui](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/hamza_rezgui/32/1712_2.png) [@Hamza\_Rezgui](https://forum.weaviate.io/u/Hamza_Rezgui)\
**Post date:** [June 11, 2024, 8:40am UTC](https://forum.weaviate.io/t/getbuilder-error/2672/5 "2024-06-11T08:40:17Z")

</div>

hi @DudaNogueira!  
Im running my flask app also on docker and this is its docker compose service definition

```auto
flask-app:
    image: python:3.11-slim
    ports:
      - "5000:5000"
    volumes:
      - "${FLASK_PATH_PROJECT}:/usr/src/app"
    working_dir: /usr/src/app
    environment:
      FLASK_APP: app.py
      FLASK_ENV: development
    command: bash -c "python -m venv venv && source venv/bin/activate && pip install --no-cache-dir -r requirements.txt && flask run --host=0.0.0.0"
    depends_on:
      - weaviate

```

using `client = weaviate.connect_to_local(host=weaviate)` didnt help and it gave me this error now

> Traceback (most recent call last):  
> File “/usr/src/app/venv/bin/flask”, line 8, in   
> sys.exit(main())  
> ^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/flask/cli.py”, line 1105, in main  
> cli.main()  
> File “/usr/src/app/venv/lib/python3.11/site-packages/click/core.py”, line 1078, in main  
> rv = self.invoke(ctx)  
> ^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/click/core.py”, line 1688, in invoke  
> return \_process\_result(sub\_ctx.command.invoke(sub\_ctx))  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/click/core.py”, line 1434, in invoke  
> return ctx.invoke(self.callback, \*\*ctx.params)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/click/core.py”, line 783, in invoke  
> return \_\_callback(\*args, \*\*kwargs)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/click/decorators.py”, line 92, in new\_func  
> return ctx.invoke(f, obj, \*args, \*\*kwargs)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/click/core.py”, line 783, in invoke  
> return \_\_callback(\*args, \*\*kwargs)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/flask/cli.py”, line 953, in run\_command  
> raise e from None  
> File “/usr/src/app/venv/lib/python3.11/site-packages/flask/cli.py”, line 937, in run\_command  
> app: WSGIApplication = info.load\_app()  
> ^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/flask/cli.py”, line 335, in load\_app  
> app = locate\_app(import\_name, name)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/flask/cli.py”, line 245, in locate\_app  
> **import** (module\_name)  
> File “/usr/src/app/app.py”, line 2, in   
> from endpoints import endpoints\_bp  
> File “/usr/src/app/endpoints.py”, line 2, in   
> from utils import extract\_text, save\_vectorstore, similarity\_search  
> File “/usr/src/app/utils.py”, line 12, in   
> client = weaviate.connect\_to\_local(host=weaviate)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/weaviate/connect/helpers.py”, line 205, in connect\_to\_local  
> http=ProtocolParams(host=host, port=port, secure=False),  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/usr/src/app/venv/lib/python3.11/site-packages/pydantic/main.py”, line 176, in **init**  
> self. **pydantic\_validator**.validate\_python(data, self\_instance=self)  
> pydantic\_core.\_pydantic\_core.ValidationError: 1 validation error for ProtocolParams  
> host  
> Input should be a valid string [type=string\_type, input\_value=\<module ‘weaviate’ from ‘…s/weaviate/ **init**.py’\>, input\_type=module]  
> For further information visit [Redirecting...](https://errors.pydantic.dev/2.7/v/string_type)

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [June 11, 2024, 2:15pm UTC](https://forum.weaviate.io/t/getbuilder-error/2672/6 "2024-06-11T14:15:46Z")

</div>

> [@DudaNogueira](#):
>
> `client = weaviate.connect_to_local(host=weaviate)`

Ooops.

the host should be `weaviate` as a string.

so

`client = weaviate.connect_to_local(host="weaviate")`

this failed as it was passing the weaviate module itself as the host 😬

Let me know if this works.

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [June 11, 2024, 2:17pm UTC](https://forum.weaviate.io/t/getbuilder-error/2672/7 "2024-06-11T14:17:21Z")

</div>

This is because your app will now connect to the container “weaviate” that is a hostname available inside your docker-compose, based on the name of the services 🙂

---

<div class="post-metadata">

**Author:** ![Hamza\_Rezgui](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/hamza_rezgui/32/1712_2.png) [@Hamza\_Rezgui](https://forum.weaviate.io/u/Hamza_Rezgui)\
**Post date:** [June 12, 2024, 11:16am UTC](https://forum.weaviate.io/t/getbuilder-error/2672/8 "2024-06-12T11:16:17Z")

</div>

hi @DudaNogueira! this is the right one thank you so much for your assistance !  
One final question if you don’t mind, Im using an embedding model from hugging face through the pipeline method and i was wondering which one is the best to use so i can store the vectors in the weaviate database ?

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [June 12, 2024, 5:52pm UTC](https://forum.weaviate.io/t/getbuilder-error/2672/9 "2024-06-12T17:52:56Z")

</div>

Hi!

It will depend. Using [this integration/module](https://weaviate.io/developers/weaviate/model-providers/huggingface) will give you the advantage of not worrying with vectorizing your content both to ingest and search.

If you ever change any of the fields marked to be vectorized, Weaviate will automatically vectorize your updated object.

If you go the pipeline route (or ingesting/updating the vectors yourself), you will need to always vectorize you data.

Let me know if this helps 🙂

Thanks!
