# Batch import silently fails

**URL:** <https://forum.weaviate.io/t/batch-import-silently-fails/9460>\
**Category:** Support\
**Created:** [December 26, 2024, 2:15pm UTC](https://forum.weaviate.io/t/batch-import-silently-fails/9460 "2024-12-26T14:15:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luka\_Secerovic](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/luka_secerovic/32/1664_2.png) [@Luka\_Secerovic](https://forum.weaviate.io/u/Luka_Secerovic)\
**Post date:** [December 26, 2024, 2:15pm UTC](https://forum.weaviate.io/t/batch-import-silently-fails/9460/1 "2024-12-26T14:15:10Z")

</div>

I’m using the following code to import to a collection:

```auto
with collection.batch.dynamic() as batch:
    for data_row in [
        {
            "filename": "feeds.pdf",
            "chunk": content,
            "chunk_n": 1,
        },
...
    ]:
        uuid = batch.add_object(
            properties=data_row,
        )
        print(uuid)

```

Some of the objects didn’t get ingested - I noticed that by counting the expected number of documents and the actual number of documents in the db.

I had to do some debugging and figured it’s because some of the chunks were too big for the embedding model.

Is there a way to know if an ingestion during batch went correctly? There was no error.

---

<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:** [December 26, 2024, 2:57pm UTC](https://forum.weaviate.io/t/batch-import-silently-fails/9460/2 "2024-12-26T14:57:08Z")

</div>

hi @Luka_Secerovic !!

You need to inspect the end result of your batch.

for example, consider this code:

```python
import weaviate

client = weaviate.connect_to_local()
objects = [
    {"text": "object 1", "vector": [1,2,3]},
    {"text": "object 2", "vector": [1,2,3,4,5]},
]
client.collections.delete("Test")
collection = client.collections.create("Test")

with collection.batch.dynamic() as batch:
    for obj in objects:
        batch.add_object(
            properties={"text": obj["text"]}, 
            vector=obj["vector"]
        )

```

this will not be imported, because we have objects with different sized vectors.

After running this code, you should see the following in logs:

`{'message': 'Failed to send 1 objects in a batch of 2. Please inspect client.batch.failed_objects or collection.batch.failed_objects for the failed objects.'}`

now, in `collection.batch.failed_objects` with have

> [ErrorObject(message=‘inconsistent vector lengths: 5 != 3’, object\_=\_BatchObject(collection=‘Test’, vector=[1.0, 2.0, 3.0], uuid=‘1d64911a-b270-42a6-9346-ecbda0275e9d’, properties={‘text’: ‘object 1’}, tenant=None, references=None, index=0, retry\_count=0), original\_uuid=‘1d64911a-b270-42a6-9346-ecbda0275e9d’)]

Let me know if that helps!

Thanks!
