Skip to content

LookupError: Tenant not found #4940

Open
@liuxc1

Description

@liuxc1

Is there an existing issue for the same bug?

  • I have checked the existing issues.

RAGFlow workspace code commit ID

0.16

RAGFlow image version

0.16

Other environment information

Actual behavior

agflow-server | 2025-02-13 19:31:22,637 INFO 19 172.21.0.6 - - [13/Feb/2025 19:31:22] "GET /v1/document/thumbnails?doc_ids=b8430e0ee9ad11efb74d0242ac150006 HTTP/1.1" 200 -
ragflow-server | Traceback (most recent call last):
ragflow-server | File "/ragflow/api/apps/conversation_app.py", line 230, in stream
ragflow-server | for ans in chat(dia, msg, True, **req):
ragflow-server | File "/ragflow/api/db/services/dialog_service.py", line 362, in chat
ragflow-server | for ans in chat_mdl.chat_streamly(prompt, msg[1:], gen_conf):
ragflow-server | File "/ragflow/api/db/services/llm_service.py", line 299, in chat_streamly
ragflow-server | if not TenantLLMService.increase_usage(
ragflow-server | File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 3128, in inner
ragflow-server | return fn(*args, **kwargs)
ragflow-server | File "/ragflow/api/db/services/llm_service.py", line 176, in increase_usage
ragflow-server | raise LookupError("Tenant not found")
ragflow-server | LookupError: Tenant not found

Expected behavior

No response

Steps to reproduce

agflow-server  | 2025-02-13 19:31:22,637 INFO     19 172.21.0.6 - - [13/Feb/2025 19:31:22] "GET /v1/document/thumbnails?doc_ids=b8430e0ee9ad11efb74d0242ac150006 HTTP/1.1" 200 -
ragflow-server  | Traceback (most recent call last):
ragflow-server  |   File "/ragflow/api/apps/conversation_app.py", line 230, in stream
ragflow-server  |     for ans in chat(dia, msg, True, **req):
ragflow-server  |   File "/ragflow/api/db/services/dialog_service.py", line 362, in chat
ragflow-server  |     for ans in chat_mdl.chat_streamly(prompt, msg[1:], gen_conf):
ragflow-server  |   File "/ragflow/api/db/services/llm_service.py", line 299, in chat_streamly
ragflow-server  |     if not TenantLLMService.increase_usage(
ragflow-server  |   File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 3128, in inner
ragflow-server  |     return fn(*args, **kwargs)
ragflow-server  |   File "/ragflow/api/db/services/llm_service.py", line 176, in increase_usage
ragflow-server  |     raise LookupError("Tenant not found")
ragflow-server  | LookupError: Tenant not found

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