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

[Question]: RAGFlowJsonParser._json_split() missing 2 required positional arguments: current_path and chunks #4034

Open
rpopplewell opened this issue Dec 13, 2024 · 2 comments
Labels
question Further information is requested

Comments

@rpopplewell
Copy link

Describe your problem

I'm working with v0.14.1-slim from a docker image as described in the README.md. In attempting to parse a json file we get the following error:
[ERROR]Internal server error while chunking: RAGFlowJsonParser._json_split() missing 2 required positional arguments: current_path and chunks

This function appears to be under /deepdoc/parser/json_parser.py
Here's the traceback:

  File "/ragflow/rag/svr/task_executor.py", line 449, in handle_task
    do_handle_task(task)
  File "/ragflow/rag/svr/task_executor.py", line 388, in do_handle_task
    cks = build(r)
  File "/ragflow/rag/svr/task_executor.py", line 200, in build
    cks = chunker.chunk(row["name"], binary=binary, from_page=row["from_page"],
  File "/ragflow/rag/app/naive.py", line 258, in chunk
    sections = JsonParser(int(parser_config.get("chunk_token_num", 128)))(binary)
  File "/ragflow/deepdoc/parser/json_parser.py", line 24, in __call__
    chunks = self.split_json(json_data, True)
  File "/ragflow/deepdoc/parser/json_parser.py", line 95, in split_json
    chunks = self._json_split(self._list_to_dict_preprocessing(json_data))
TypeError: RAGFlowJsonParser._json_split() missing 2 required positional arguments: 'current_path' and 'chunks'```
@rpopplewell rpopplewell added the question Further information is requested label Dec 13, 2024
@zifeiYv
Copy link

zifeiYv commented Dec 14, 2024

Codes have already been updated, try to upgrade your project maybe?

@rpopplewell
Copy link
Author

Codes have already been updated, try to upgrade your project maybe?

The docker image was not. Your link reflects the source code but not the docker image. I'm AFK but I'll pull a fresh image tomorrow.

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

No branches or pull requests

2 participants