dify icon indicating copy to clipboard operation
dify copied to clipboard

fix: csv injection in annotations export

Open zyssyz123 opened this issue 2 weeks ago • 1 comments

[!IMPORTANT]

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Screenshots

Before After
... ...

Checklist

  • [ ] This change requires a documentation update, included: Dify Document
  • [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • [x] I've updated the documentation accordingly.
  • [x] I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

zyssyz123 avatar Dec 11 '25 03:12 zyssyz123

This is a known bug in RAGFlow v0.22.1: the code calls the OpenAI client's completions.create() method with an unsupported argument unused=None, which causes the error when adding Qwen or other vision models via vLLM. The fix is to remove the unused argument from the call in rag/llm/cv_model.py—this has already been corrected in the latest code, but for v0.22.1 you'll need to do it manually.

If you're running RAGFlow in Docker, you can fix it without rebuilding the container:

  1. Enter the running container:
    docker exec -it docker-ragflow-cpu-1 /bin/bash
  2. Edit rag/llm/cv_model.py (line 204), remove unused=None from the relevant function call.
  3. Save the file and exit.
  4. Restart the container:
    docker restart docker-ragflow-cpu-1

This will resolve the error. For more details and confirmation from maintainers, see this issue and fix instructions. Make sure only supported parameters are passed to the LLM client to avoid similar issues in the future.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

dosubot[bot] avatar Dec 11 '25 07:12 dosubot[bot]

pull the latest code.

Magicbook1108 avatar Dec 11 '25 09:12 Magicbook1108

The problem I encountered when parsing the file is also like this.

Image

ouyong-1 avatar Dec 14 '25 06:12 ouyong-1

@ouyong-1 pull the latest code.

Magicbook1108 avatar Dec 15 '25 01:12 Magicbook1108