Skip to content
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

Error saving index: RangeError: Invalid string length #38

Open
Gitter-MI opened this issue Dec 20, 2023 · 2 comments
Open

Error saving index: RangeError: Invalid string length #38

Gitter-MI opened this issue Dec 20, 2023 · 2 comments

Comments

@Gitter-MI
Copy link

Hi Steven,
vb here from the openai community forum.
When creating an index I ran into this error where the filename is too long which causes the index creation to fail.

Error: Error adding document "C:\Users\VB\source\repos\evals.git\lfs\objects\03\5f\035fbfc20caee391612ae6e8f394b0788406f493b208e67419bb1eea17f9575c": Error: Error saving index: RangeError: Invalid string length
at LocalDocumentIndex. (C:\Users\VeitB\AppData\Roaming\npm\node_modules@stevenic\codepilot\node_modules\vectra\lib\LocalDocumentIndex.js:258:23)
at Generator.throw ()
at rejected (C:\Users\VB\AppData\Roaming\npm\node_modules@stevenic\codepilot\node_modules\vectra\lib\LocalDocumentIndex.js:29:65)

This is the filename "035fbfc20caee391612ae6e8f394b0788406f493b208e67419bb1eea17f9575c". The file has no extension.

Ps. I know I should have excluded the .git folder anyways.

@Gitter-MI
Copy link
Author

I tried to add the same project (OpenAI evals) again to vectra using Codepilot and this time made sure to exclude the directory and files that previously caused the error. But the same error was thrown later in the process. I have come to believe that this may actually be an issue with rate limiting on the side of the OpenAI account used. In this particular case the account was Tier 1 with a token limit of 1.000.000 TPM and that the error message does not correctly decribe the reason for the error.
If this assumption is correct then in this scenario it is not possible to create a project because the only way to rebuild is to create from scratch and the same error will occur again.

@Stevenic
Copy link
Owner

Yeah at some point the JSON just gets to be too big... The limit for an index is around 2,000 files currently. I'm hoping to address that in Vectra 2 with a more compact file format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants