Find answers from the community

s
F
Y
a
P
Updated last year

Node error

error while querying

Plain Text
query_engine = index.as_query_engine()
response = query_engine.query(query)


ERROR OUTPUT
Plain Text
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/tmp/ipykernel_113122/3918986344.py in <module>
      1 query_engine = index.as_query_engine()
----> 2 respons = query_engine.query(query)

. . . . .

~/.local/lib/python3.10/site-packages/llama_index/data_structs/node.py in __post_init__(self)
     64         # NOTE: for Node objects, the text field is required
     65         if self.text is None:
---> 66             raise ValueError("text field not set.")
     67 
     68         if self.node_info is None:

ValueError: text field not set.

@Logan M @ravitheja
L
A
t
8 comments
Somehow a node is being created without text.

No idea why lol but this specific error shouldn't be possible in newer versions. In assuming you have an older version of the code πŸ‘€
using llama-index==0.6.20
is there any possibility for this version?
can this error be resolved in this version?
Do you have a traceback that's not cut off? I can't see where in the code this might be happening πŸ‘€
This error happens with me also I upgraded llama-index to 0.7.13 version.
@theOldPhilosopher this means you have a node/document that doesn't have text... really surprised that it can happen tbh πŸ€” Would be curious to know how you got there
Add a reply
Sign up and join the conversation on Discord