-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kb grep "IndexError: list index out of range" #83
Comments
Thanks for opening a new issue. The team has been notified and will review it as soon as possible. |
Dear Sir, I am unable to reproduce the error, can we try to isolate the issue by being more specific about when this throws an exception? |
Dear Sir, this looks a lot like an older version bug, could you try to uninstall kb and try to re-install the latest version? |
Can you let me know if the bug persists on the latest version? |
How can i reproduce this? Could you send me some articles from your knowledge base? so that I can inspect them? Probaby related to some UTF-8 char? Did you try deleting your knowledge base and trying to import it again? You can do something like: To quickly reimport your artcles from text files. |
Ok, I think I was able to track the issue. I think that updating kb was not enough since this is related to how kb used to store in previous versions artifacts. Hence, I htink you should basically delete your knowledge base and re-import it. Unluckily these were issues of previous versions of kb on how data was stored. These issues are fixed with the latest version. |
Hi, i found that the problem (also?) occurs when the title of an artifact contains spaces. Reproducing the error: kb add -t 'win style name' -b win
kb grep win The cause seems that get_filename_parts_wo_prefix() parses the title of the artifacts incorrectly. Instead of the expected two element tuple of the form Quick fix for the users until the issue is resolved: remove spaces/backslashes from your artifacts' titles. For parsing the path correctly, the pathlib module might help. I'm not sure why backslashes are removed. Is this done to ensure windows compatibility? |
Hi! It's me again. I've been working on migrating my notes into kb, and I ran across this error. I'm planning on looking into it a bit, but I wanted to open the issue first.
Expected Behavior
kb ought to display a list of artifacts containing the word, as shown in https://github.com/gnebbia/kb#grep-through-the-knowledge-base
Actual Behavior
kb throws an IndexError. This only seems to occur if the grep successfully matches an artifact. Nothing seems to change if I use the -v flag. It works if I use the -m flag to show the matching lines instead of the artifacts.
Ghostbin with full error: https://ghostbin.co/paste/tyqqos
Steps to Reproduce the Problem
kb grep
with any word that exists in the knowledge base.Specifications
The text was updated successfully, but these errors were encountered: