Find answers from the community

Updated 2 months ago

has anyone seen this error after running

has anyone seen this error after running
index = GPTSimpleVectorIndex.from_documents()
and then calling
index.save_to_disk()

TypeError: The view function for 'post_reindex' did not return a valid response. The function either returned None or ended without a return statement.


after this there seems to be a index file saved, if I load it and try to query then i get this error
TypeError: string indices must be integers
L
T
9 comments
What's the full error there? I've never seen that before πŸ‘€ Did you actually pass in documents before saving? I think you need at least an empty array GPTSimpleVectorIndex.from_documents([])
@Logan M this is what it says
the from_documents has a list of json objects, i just didnt put the full list here
Ohhhh the error is with flask πŸ‘€
What does the code for that endpoint look like?
that's pretty much the whole function, so it seems to actually output an index json
Attachment
image.png
but when i do this, it cant seem to load it
Attachments
image.png
image.png
Ohhh you don't want load_from_dict
You want load_from_disk()
ah... that'd be it 🫣
Add a reply
Sign up and join the conversation on Discord