Running the code on my local machine. It asked me to import schema first. What is that? It is not covered.
UnexpectedStatusCodeException Traceback (most recent call last)
Cell In[17], line 6
1 response = (
2 client.query
3 .get("Question", ["question", "answer", "category"])
4 .with_near_text({"concepts": ["biology"]})
5 .with_limit(2)
----> 6 .do()
7 )
9 print(json.dumps(response, indent=4))
File c:\ProgramData\Anaconda3\envs\Health_Report_Embedding\lib\site-packages\weaviate\gql\get.py:1905, in GetBuilder.do(self)
1903 return results
1904 else:
-> 1905 return super().do()
File c:\ProgramData\Anaconda3\envs\Health_Report_Embedding\lib\site-packages\weaviate\gql\filter.py:124, in GraphQL.do(self)
121 except RequestsConnectionError as conn_err:
122 raise RequestsConnectionError("Query was not successful.") from conn_err
--> 124 res = _decode_json_response_dict(response, "Query was not successful")
125 assert res is not None
126 return res
File c:\ProgramData\Anaconda3\envs\Health_Report_Embedding\lib\site-packages\weaviate\util.py:798, in _decode_json_response_dict(response, location)
795 except JSONDecodeError:
796 raise ResponseCannotBeDecodedException(location, response)
--> 798 raise UnexpectedStatusCodeException(location, response)
UnexpectedStatusCodeException: Query was not successful! Unexpected status code: 422, with response body: {'error': [{'message': 'no graphql provider present, this is most likely because no schema is present. Import a schema first!'}]}.