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

An error occurred: Extra data: line 21602 column 4 (char 18734083) #303

Open
zel2023 opened this issue Nov 19, 2024 · 4 comments
Open

An error occurred: Extra data: line 21602 column 4 (char 18734083) #303

zel2023 opened this issue Nov 19, 2024 · 4 comments

Comments

@zel2023
Copy link

zel2023 commented Nov 19, 2024

When I try to use LightRAG for a local query, I encounter the error: "An error occurred: Extra data: line 21602 column 4 (char 18734083)".

@LarFii
Copy link
Collaborator

LarFii commented Nov 19, 2024

This seems to be an issue with the JSON format. Did it occur during the query process? Do you have the full logs and code snippet available for debugging?

@zel2023
Copy link
Author

zel2023 commented Nov 19, 2024

I just input a string, and set the prompt as follows:
f'''
xxx
{string}
xxx
'''

However, the string itself is quite complex and may contain some escape characters.
It seems that no other errors were reported, and no log file was generated.

@zel2023
Copy link
Author

zel2023 commented Nov 19, 2024

I found this error occurred during initialization:

        embedding_dimension =  await get_embedding_dim()
        #print(f"Detected embedding dimension: {embedding_dimension}")

        rag = LightRAG(
            working_dir=WORKING_DIR,
            llm_model_func=llm_model_func,
            embedding_func=EmbeddingFunc(
                embedding_dim=embedding_dimension, max_token_size=8192, func=embedding_func
            ),
        )

I tried changing the WORKING_DIR, and the error no longer occurs.

image

@zel2023
Copy link
Author

zel2023 commented Nov 20, 2024

I realized that I should have input JSON data the first time, which might have caused an issue with the cache. After that, inputting strings didn't work either.

@zel2023 zel2023 closed this as completed Nov 20, 2024
@zel2023 zel2023 reopened this Nov 20, 2024
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