# Possible bug when query object by uuid

**URL:** <https://forum.weaviate.io/t/possible-bug-when-query-object-by-uuid/1316>\
**Category:** Support\
**Created:** [January 29, 2024, 1:27am UTC](https://forum.weaviate.io/t/possible-bug-when-query-object-by-uuid/1316 "2024-01-29T01:27:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shadowlin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shadowlin/32/800_2.png) [@shadowlin](https://forum.weaviate.io/u/shadowlin)\
**Post date:** [January 29, 2024, 1:27am UTC](https://forum.weaviate.io/t/possible-bug-when-query-object-by-uuid/1316/1 "2024-01-29T01:27:38Z")

</div>

A strange bug(or my mistake) in 4.4b8 with weaviate 1.23.3(1.23.6 still the same)

```auto
uuid = "b4c4b93e-10ef-5098-b525-cd2bd29f1870"
print("-------------")
result1 = client.collections.get("FileData").query.fetch_objects(
    filters=Filter.by_id().equal(uuid)
)
print("fetch_objects:", result1)

result2 = client.collections.get("FileData").query.fetch_object_by_id(
    uuid=uuid
)
print("fetch_object_by_id:", result2)

```

I think the two approch should have the same result but it turned out not.

the result is

fetch\_objects: QueryReturn(objects=[Object(uuid=\_WeaviateUUIDInt(‘b4c4b93e-10ef-5098-b525-cd2bd29f1870’), metadata=MetadataReturn(creation\_time=None, last\_update\_time=None, distance=None, certainty=None, score=None, explain\_score=None, is\_consistent=None, rerank\_score=None), properties={‘hash’: ‘file\_hash\_0’, ‘status’: 0}, references=None, vector=None, collection=‘FileData’)])

fetch\_object\_by\_id: None

I don’t know why fetch\_object\_by\_id can’t get the objects

EDIT:  
After some digging I find under the hood fetch\_object\_by\_id also uses filters=Filter.by\_id().equal(uuid) to filter the object but the only differernce is it add a limit=1 parameter.It turns out the limit=1 somehow make it not get the object.  
I tried

```auto
result1 = client.collections.get("FileData").query.fetch_objects(
    filters=Filter.by_id().equal(uuid),
    limit=1
)

```

---

<div class="post-metadata">

**Author:** ![Dirk](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dirk/32/46_2.png) [@Dirk](https://forum.weaviate.io/u/Dirk)\
**Post date:** [January 30, 2024, 4:26am UTC](https://forum.weaviate.io/t/possible-bug-when-query-object-by-uuid/1316/3 "2024-01-30T04:26:37Z")

</div>

Could you create a minimal example or provide a backup of your class (in private on slack is also ok) - I don’t see how this could happen. Only explanation would be that you trigger some weaviate bug that we do not hit.

the fetch\_XXX functions are used hundreds of times in our test suite and I have never seen an error like this

---

<div class="post-metadata">

**Author:** ![shadowlin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shadowlin/32/800_2.png) [@shadowlin](https://forum.weaviate.io/u/shadowlin)\
**Post date:** [January 31, 2024, 1:54am UTC](https://forum.weaviate.io/t/possible-bug-when-query-object-by-uuid/1316/4 "2024-01-31T01:54:41Z")

</div>

I am not sure If I can recreate this situation.

I have wiped the old data and it seems haven’t happend again yet.

I think it is not related to client side.
