ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Bug]: Exceptions from Trio nursery (10 sub-exceptions) -- Account abnormal. Please ensure it's on good standing to use QWen's

Open kowyo opened this issue 8 months ago • 8 comments

Self Checks

  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (Language Policy).
  • [x] Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • [x] Please do not modify this template :) and fill in all the required fields.

RAGFlow workspace code commit ID

3569320

RAGFlow image version

v0.18.0

Other environment information

Linux AMD64

Actual behavior

[ERROR][Exception]: Exceptions from Trio nursery (10 sub-exceptions) -- Account abnormal. Please ensure it's on good standing to use QWen's

Expected behavior

No response

Steps to reproduce

Upload PDF and parse

Additional information

I have tested api key with

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.getenv("DASHSCOPE_API_KEY"),  # 如果您没有配置环境变量,请在此处用您的API Key进行替换
    base_url="https://dashscope.aliyuncs.com/compatible-mode/v1"  # 百炼服务的base_url
)

completion = client.embeddings.create(
    model="text-embedding-v3",
    input='衣服的质量杠杠的,很漂亮,不枉我等了这么久啊,喜欢,以后还来这里买',
    dimensions=1024, # 指定向量维度(仅 text-embedding-v3 支持该参数)
    encoding_format="float"
)

print(completion.model_dump_json())

It returns normally. I don't know what's wrong with Qwen

kowyo avatar Apr 25 '25 17:04 kowyo

The error message "Account abnormal. Please ensure it's on good standing to use QWen's" indicates that there might be an issue with the account status when using QWen's services through RAGFlow. This error is raised when the account associated with the API key is not in good standing, which is a prerequisite for using QWen's services [1].

Here are a few steps you can take to troubleshoot and resolve this issue:

  1. Verify Account Status: Ensure that the account associated with the API key is active and in good standing. This might involve checking for any outstanding issues or restrictions on the account.

  2. API Key Validation: Double-check that the API key used in your environment is correct and has the necessary permissions to access QWen's services. You can test the API key separately to confirm its validity.

  3. Check for Sub-exceptions: The mention of "10 sub-exceptions" suggests that there might be multiple underlying issues. Review the logs or error messages to identify any specific sub-exceptions that could provide more insight into the problem.

  4. Environment Configuration: Ensure that your environment is correctly configured, including any necessary dependencies and settings for RAGFlow and QWen's services.

If the account status and API key are confirmed to be correct, and the issue persists, further investigation into the specific sub-exceptions might be necessary to pinpoint the exact cause of the problem.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Apr 25 '25 17:04 dosubot[bot]

Similar isses https://github.com/infiniflow/ragflow/issues/5761

kowyo avatar Apr 25 '25 17:04 kowyo

Image

kowyo avatar Apr 26 '25 03:04 kowyo

+---------------- 10 ----------------
| Traceback (most recent call last):
|   File "/ragflow/rag/llm/embedding_model.py", line 199, in encode
|     embds = [[] for _ in range(len(resp["output"]["embeddings"]))]
| TypeError: 'NoneType' object is not subscriptable
|
| During handling of the above exception, another exception occurred:
|
| Traceback (most recent call last):
|   File "/ragflow/graphrag/utils.py", line 319, in graph_node_to_chunk
|     ebd, _ = await trio.to_thread.run_sync(lambda: embd_mdl.encode([ent_name]))
|   File "/ragflow/.venv/lib/python3.10/site-packages/trio/_threads.py", line 447, in to_thread_run_sync
|     return msg_from_thread.unwrap()
|   File "/ragflow/.venv/lib/python3.10/site-packages/outcome/_impl.py", line 213, in unwrap
|     raise captured_error
|   File "/ragflow/.venv/lib/python3.10/site-packages/trio/_threads.py", line 373, in do_release_then_return_result
|     return result.unwrap()
|   File "/ragflow/.venv/lib/python3.10/site-packages/outcome/_impl.py", line 213, in unwrap
|     raise captured_error
|   File "/ragflow/.venv/lib/python3.10/site-packages/trio/_threads.py", line 392, in worker_fn
|     ret = context.run(sync_fn, *args)
|   File "/ragflow/graphrag/utils.py", line 319, in <lambda>
|     ebd, _ = await trio.to_thread.run_sync(lambda: embd_mdl.encode([ent_name]))
|   File "<@beartype(api.db.services.llm_service.LLMBundle.encode) at 0x7fff956c9000>", line 31, in encode
|   File "/ragflow/api/db/services/llm_service.py", line 238, in encode
|     embeddings, used_tokens = self.mdl.encode(texts)
|   File "<@beartype(rag.llm.embedding_model.QWenEmbed.encode) at 0x7fffa409c310>", line 31, in encode
|   File "/ragflow/rag/llm/embedding_model.py", line 206, in encode
|     raise Exception("Account abnormal. Please ensure it's on good standing to use QWen's "+self.model_name)
| Exception: Account abnormal. Please ensure it's on good standing to use QWen's text-embedding-v3
+------------------------------------

kowyo avatar Apr 26 '25 03:04 kowyo

yh,I have the same problem.

logs: 2025-04-27 08:49:03,641 INFO 23 set_progress(61b4c504230111f087792e3ceb3d9e59), progress: -1, progress_msg: 08:49:03 [ERROR][Exception]: Exceptions from Trio nursery (10 sub-exceptions) -- Account abnormal. Please ensure it's on good standing to use QWen's text-embedding-v3 2025-04-27 08:49:03,641 ERROR 23 handle_task got exception for task {"id": "61b4c504230111f087792e3ceb3d9e59", "doc_id": "b7e2111421a511f0b0f9467e16091dfe", "from_page": 100000000, "to_page": 100000000, "retry_count": 0, "kb_id": "a2e419b021a511f0a218467e16091dfe", "parser_id": "naive", "parser_config": {"layout_recognize": "DeepDOC", "chunk_token_num": 512, "delimiter": "\n", "auto_keywords": 5, "auto_questions": 1, "html4excel": false, "raptor": {"use_raptor": false}, "graphrag": {"use_graphrag": true, "entity_types": ["organization", "person", "geo", "event", "category"], "method": "light", "resolution": true, "community": true}, "pages": []}, "name": "\u5f69\u7968\u77e5\u8bc6\u5e93(\u5408\u5e76).docx", "type": "doc", "location": "\u5f69\u7968\u77e5\u8bc6\u5e93(\u5408\u5e76).docx", "size": 54787, "tenant_id": "16cf79e019f511f0a79c96b2ebb4b892", "language": "English", "embd_id": "text-embedding-v3@Tongyi-Qianwen", "pagerank": 0, "kb_parser_config": {"layout_recognize": "DeepDOC", "chunk_token_num": 512, "delimiter": "\n", "auto_keywords": 0, "auto_questions": 0, "html4excel": false, "raptor": {"use_raptor": false}, "graphrag": {"use_graphrag": true, "entity_types": ["organization", "person", "geo", "event", "category"], "method": "light", "resolution": true, "community": true}}, "img2txt_id": "qwen-vl-plus@Tongyi-Qianwen", "asr_id": "", "llm_id": "qwen-plus@Tongyi-Qianwen", "update_time": 1745714928968, "task_type": "graphrag"}

  • Exception Group Traceback (most recent call last): | File "/ragflow/rag/svr/task_executor.py", line 613, in handle_task | await do_handle_task(task) | File "/ragflow/rag/svr/task_executor.py", line 540, in do_handle_task | await run_graphrag(task, task_language, with_resolution, with_community, chat_model, embedding_model, progress_callback) | File "/ragflow/graphrag/general/index.py", line 81, in run_graphrag | new_graph = await merge_subgraph( | File "/ragflow/graphrag/general/index.py", line 220, in merge_subgraph | await set_graph(tenant_id, kb_id, embedding_model, new_graph, change, callback) | File "/ragflow/graphrag/utils.py", line 457, in set_graph | async with trio.open_nursery() as nursery: | File "/ragflow/.venv/lib/python3.10/site-packages/trio/_core/_run.py", line 1058, in aexit | raise combined_error_from_nursery | exceptiongroup.ExceptionGroup: Exceptions from Trio nursery (10 sub-exceptions)

my account detail:

Image

craihyc avatar Apr 27 '25 00:04 craihyc

hi @craihyc , as far as I have investigated, it is not related to the token amount you have, instead, it is related to your API's RPM. I am still investigating. Similar issues: #6941

kowyo avatar Apr 27 '25 10:04 kowyo

这个是模型限流了,可是ragflow应该要有地方配置embbed的速率啊

inewlife avatar May 14 '25 02:05 inewlife

it maybe relate to the text-embedding model.I changed from text-embedding-v3 to text-embedding-v2, then the error fixed. i guesss though the v3 and v2 has same RPS and RPM. but the dashcode doesn't support.

kirinshow avatar May 21 '25 07:05 kirinshow

@kowyo @inewlife 有解决方案了吗 哥们 是要开阿里百炼的会员吗

zihaosino avatar May 23 '25 16:05 zihaosino

Is there a solution yet, bro? Do I need to subscribe to Alibaba Bailian membership?

@zihaosino yes, currently workaround:

  1. Change supplier from Alibaba to others.
  2. Use Ollama.
  3. Use full edition of RAGFlow, which has local model like bge inside.

kowyo avatar May 26 '25 02:05 kowyo

@kowyo @inewlife 有解决方案了吗 哥们 是要开阿里百炼的会员吗

我充钱了,但是也不行。。。

vincentcheung1985 avatar May 27 '25 05:05 vincentcheung1985