Skip to content

[Bug]: Failed to upload image, prompt says "Upload failed." #5368

Open
@SilasDong

Description

@SilasDong

Is there an existing issue for the same bug?

  • I have checked the existing issues.

RAGFlow workspace code commit ID

IMAGE ID 83633badb94e

RAGFlow image version

nightly-slim

Other environment information

ubuntu22.04.3

Actual behavior

2025-02-26 11:13:07,305 ERROR 19 list index out of range

Traceback (most recent call last):

File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request

rv = self.dispatch_request()

File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request

return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]

File "/ragflow/.venv/lib/python3.10/site-packages/flask_login/utils.py", line 290, in decorated_view

return current_app.ensure_sync(func)(*args, **kwargs)

File "/ragflow/api/utils/api_utils.py", line 170, in decorated_function

return func(*_args, **_kwargs)

File "/ragflow/api/apps/document_app.py", line 534, in upload_and_parse

doc_ids = doc_upload_and_parse(request.form.get("conversation_id"), file_objs, current_user.id)

File "/ragflow/api/db/services/document_service.py", line 507, in doc_upload_and_parse

kb_id = dia.kb_ids[0]

IndexError: list index out of range

2025-02-26 11:13:07,306 INFO 19 172.20.0.6 - - [26/Feb/2025 11:13:07] "POST /v1/document/upload_and_parse HTTP/1.1" 200 -

2025-02-26 11:13:07,334 INFO 19 172.20.0.6 - - [26/Feb/2025 11:13:07] "POST /v1/document/infos HTTP/1.1" 200 -
Image

Expected behavior

No response

Steps to reproduce

1. Enter the chat page.  
2. Create a new assistant.  
3. Start a chat.
4. Upload a photo.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions