Anybody else here think that perhaps a GitHub issue should be raised to return a better error than the “PANIC” errors? I don’t find the error text particularly helpful for debugging. There’s nothing in it that would lead someone to guess that the problem is due to a missing vectorizer. Can’t the Weaviate techs modify the code to check for that condition in the collection schema and return a specific error instead?
Perhaps Weaviate needs its own “Lint” utility that analyzes a newly added schema and reports likely trouble spots?
1 Like
hi Robert!
Absolutely. I have raised this exact concern with our team.
They are aware of this, but they were not able to fix it just yet.
But worry not: they have this already mapped.
Please, consider leaving your on this GH issue so we can move it up on the priority list hehehehe
opened 12:07PM - 21 Mar 24 UTC
bug
Bad UX
### How to reproduce this bug?
1. Run Weviate using docker-compose or k8 and ha… ving ` DEFAULT_VECTORIZER_MODULE: 'none'`
2. Run the below python code
```
import weaviate
import weaviate.classes.config as wvc
from weaviate.collections.classes.data import DataObject
client = weaviate.connect_to_local()
if (client.collections.exists("nearTexttest")):
client.collections.delete("nearTexttest")
collection = client.collections.create(
name="nearTexttest",
vector_index_config=wvc.Configure.VectorIndex.hnsw(),
properties=[
wvc.Property(name="text", data_type=wvc.DataType.TEXT, vectorize_property_name=True,tokenization=wvc.Tokenization.WORD, index_searchable=True),
wvc.Property(name="page", data_type=wvc.DataType.NUMBER, vectorize_property_name=True),
],
multi_tenancy_config=wvc.Configure.multi_tenancy(False),
replication_config= wvc.Configure.replication(factor=3)
)
def load_records():
collection.data.insert_many(
[
DataObject(properties={"text": "apples are big", "page": 1},vector=[1.0]* 3),
DataObject(properties={"text": "bananas are small", "page": 2},vector=[2.0]*3),
DataObject(properties={"text": "foo", "page": 3},vector=[3.0]*3),
DataObject(properties={"text": "bar", "page": 4},vector=[4.0]*3),
DataObject(properties={"text": "apples and bananas are fruits", "page": 5},vector=[5.0]*3),
]
)
load_records();
nearText = client.collections.get("NearTexttest")
response = nearText.query.near_text(
query="fruits in basket",
return_properties=["text"],
return_metadata=weaviate.classes.query.MetadataQuery(distance=True)
)
for o in response.objects:
print(o.properties)
print(o.metadata.distance)
print(o.vector)
````
### What is the expected behavior?
Since Vectorizer isn't provided in the class configuration and the docker config has` DEFAULT_VECTORIZER_MODULE: 'none'` , Weaviate cannot perform nearText search. We should improve the error message shown to the user by displaying something like `Vectorizer is not provided in the config and hence cannot perform nearText search. Use nearObject or nearVector search query instead`.
### What is the actual behavior?
`Query call with protocol GRPC search failed with message panic occurred: ValidateParam was called without any known params present`
### Supporting information
Python v4 client version 4.5.4
### Server Version
1.24.4
### Code of Conduct
- [X] I have read and agree to the Weaviate's [Contributor Guide](https://weaviate.io/developers/contributor-guide) and [Code of Conduct](https://weaviate.io/service/code-of-conduct)
1 Like
Upvoted! Thanks for doing that.
1 Like