Error with vector database search

Trying to search a vector database using Open AI but getting below error. Not same error every time I run. Sometimes it works and finds the keywords in the PDF knowledge base (Vector DB) and sometimes gives below errors. Not the same error every time. Gives different error file names each time. If I am lucky, without any changes, it works with the same keyword. If I restart my computer, it works sometimes. Using Pycharm. Very much appreciate any help.

ERROR Error searching for documents: Failed to open file for write: ‘IoError
{ io_error: Os { code: 5, kind: PermissionDenied, message: “Access is
denied.” }, filepath: “c757c9840bad4c5299a14c69911bc7d6.fieldnorm” }’

Error searching for documents: Failed to open file for write:
IoError { io_error: Os { code: 5, kind: PermissionDenied, message: “Access is denied.” },
filepath: “eb30a265b1b846fdb5f1f0d4c3ade51f.fast” }

ERROR Error searching for documents: Failed to open file for write: ‘IoError
{ io_error: Os { code: 5, kind: PermissionDenied, message: “Access is
denied.” }, filepath: “c9604f01273046659f0369b014e7f9fd.idx” }’

Hey @prk, thanks for reaching out and supporting Agno. I’ve shared this with the team, we’re working through all requests one by one and will get back to you soon.
If it’s urgent, please let us know. We appreciate your patience!

hey @prk this error is permission issue for your files and directory where you have stored ,could you please provide us more details , thanks :raising_hands:

Hi Ayush, thanks for the quick reply. It is not a permissions issue though the error message says it. What I realized is that the error message file c757c9840bad4c5299a14c69911bc7d6.fieldnorm doesn’t even exist. c757c9840bad4c5299a14c69911bc7d6 exists but not with extension .fieldnorm. It exists with .fast or .idx. I am not sure how it is trying to write to a file that even doesn’t exist. For me it seems like bug trying to access old files that are no longer on the vector database. I tried to delete entire database and reload it from scratch but still the same issue. With no changes, sometimes it works without errors. I also verified that no permission issue with the folders. Also, if I restart my system and run it works for the first time. It seems to me some cache or buffer issue. I am using Pycharm and tried to clear its cache but no luck.

@prk can share a bit more of code? like the Agent, Knowledge, VectorDB config? so that we may be able to replicate it at our end…