netease-youdao / QAnything

Question and Answer based on Anything.
https://qanything.ai
GNU Affero General Public License v3.0
11.54k stars 1.12k forks source link

[BUG] <title>python环境下安装报错,使用的是bash scripts/run_for_openai_api_with_cpu_in_Linux_or_WSL.sh #223

Open changqingla opened 6 months ago

changqingla commented 6 months ago

是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?

该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?

当前行为 | Current Behavior

[2024-04-08 15:59:01 +0800] [1582159] [WARNING] Sanic is running in PRODUCTION mode. Consider using '--debug' or '--dev' while actively developing your application. LOCAL DATA PATH: /dellnas/home/hutao/QAnything/QANY_DB/content LOCAL_RERANK_REPO: netease-youdao/bce-reranker-base_v1 LOCAL_EMBED_REPO: netease-youdao/bce-embedding-base_v1 <Logger debug_logger (INFO)> <Logger qa_logger (INFO)> onnxruntime-gpu 1.17.1 已经安装。 vllm 0.2.7 已经安装。 2024-04-08 15:59:07,151 - modelscope - INFO - PyTorch version 2.1.0 Found. 2024-04-08 15:59:07,152 - modelscope - INFO - Loading ast index from /dellnas/home/hutao/.cache/modelscope/ast_indexer 2024-04-08 15:59:07,234 - modelscope - INFO - Loading done! Current index file version is 1.13.0, with md5 7cd128ae87317b57bc96e941ad2bd694 and a total number of 972 components indexed use_cpu: True use_openai_api: True LOCAL DATA PATH: /dellnas/home/hutao/QAnything/QANY_DB/content LOCAL_RERANK_REPO: netease-youdao/bce-reranker-base_v1 LOCAL_EMBED_REPO: netease-youdao/bce-embedding-base_v1 <Logger debug_logger (INFO)> <Logger qa_logger (INFO)> LOCAL DATA PATH: /dellnas/home/hutao/QAnything/QANY_DB/content LOCAL_RERANK_REPO: netease-youdao/bce-reranker-base_v1 LOCAL_EMBED_REPO: netease-youdao/bce-embedding-base_v1 LOCAL DATA PATH: /dellnas/home/hutao/QAnything/QANY_DB/content LOCAL_RERANK_REPO: netease-youdao/bce-reranker-base_v1 LOCAL_EMBED_REPO: netease-youdao/bce-embedding-base_v1 <Logger debug_logger (INFO)> <Logger qa_logger (INFO)> <Logger debug_logger (INFO)> <Logger qa_logger (INFO)> LOCAL DATA PATH: /dellnas/home/hutao/QAnything/QANY_DB/content LOCAL_RERANK_REPO: netease-youdao/bce-reranker-base_v1 LOCAL_EMBED_REPO: netease-youdao/bce-embedding-base_v1 <Logger debug_logger (INFO)> <Logger qa_logger (INFO)> onnxruntime-gpu 1.17.1 已经安装。 vllm 0.2.7 已经安装。 onnxruntime-gpu 1.17.1 已经安装。 vllm 0.2.7 已经安装。 onnxruntime-gpu 1.17.1 已经安装。 vllm 0.2.7 已经安装。 onnxruntime-gpu 1.17.1 已经安装。 vllm 0.2.7 已经安装。 2024-04-08 15:59:14,403 - modelscope - INFO - PyTorch version 2.1.0 Found. 2024-04-08 15:59:14,404 - modelscope - INFO - Loading ast index from /dellnas/home/hutao/.cache/modelscope/ast_indexer 2024-04-08 15:59:14,548 - modelscope - INFO - Loading done! Current index file version is 1.13.0, with md5 7cd128ae87317b57bc96e941ad2bd694 and a total number of 972 components indexed 2024-04-08 15:59:14,627 - modelscope - INFO - PyTorch version 2.1.0 Found. 2024-04-08 15:59:14,628 - modelscope - INFO - Loading ast index from /dellnas/home/hutao/.cache/modelscope/ast_indexer 2024-04-08 15:59:14,708 - modelscope - INFO - Loading done! Current index file version is 1.13.0, with md5 7cd128ae87317b57bc96e941ad2bd694 and a total number of 972 components indexed 2024-04-08 15:59:14,745 - modelscope - INFO - PyTorch version 2.1.0 Found. 2024-04-08 15:59:14,746 - modelscope - INFO - Loading ast index from /dellnas/home/hutao/.cache/modelscope/ast_indexer 2024-04-08 15:59:14,822 - modelscope - INFO - Loading done! Current index file version is 1.13.0, with md5 7cd128ae87317b57bc96e941ad2bd694 and a total number of 972 components indexed 2024-04-08 15:59:14,896 - modelscope - INFO - PyTorch version 2.1.0 Found. 2024-04-08 15:59:14,897 - modelscope - INFO - Loading ast index from /dellnas/home/hutao/.cache/modelscope/ast_indexer 2024-04-08 15:59:14,996 - modelscope - INFO - Loading done! Current index file version is 1.13.0, with md5 7cd128ae87317b57bc96e941ad2bd694 and a total number of 972 components indexed use_cpu: True use_openai_api: True [2024-04-08 15:59:15 +0800] [1584061] [INFO] Sanic Extensions: [2024-04-08 15:59:15 +0800] [1584061] [INFO] > injection [0 dependencies; 0 constants] [2024-04-08 15:59:15 +0800] [1584061] [INFO] > openapi [http://10.0.1.1:9777/docs] [2024-04-08 15:59:15 +0800] [1584061] [INFO] > http [2024-04-08 15:59:15 +0800] [1584061] [INFO] > templating [jinja2==3.1.2] use_cpu: True use_openai_api: True use_cpu: True use_openai_api: True [2024-04-08 15:59:15 +0800] [1584060] [INFO] Sanic Extensions: [2024-04-08 15:59:15 +0800] [1584060] [INFO] > injection [0 dependencies; 0 constants] [2024-04-08 15:59:15 +0800] [1584060] [INFO] > openapi [http://10.0.1.1:9777/docs] [2024-04-08 15:59:15 +0800] [1584060] [INFO] > http [2024-04-08 15:59:15 +0800] [1584060] [INFO] > templating [jinja2==3.1.2] [2024-04-08 15:59:15 +0800] [1584063] [INFO] Sanic Extensions: [2024-04-08 15:59:15 +0800] [1584063] [INFO] > injection [0 dependencies; 0 constants] [2024-04-08 15:59:15 +0800] [1584063] [INFO] > openapi [http://10.0.1.1:9777/docs] [2024-04-08 15:59:15 +0800] [1584063] [INFO] > http [2024-04-08 15:59:15 +0800] [1584063] [INFO] > templating [jinja2==3.1.2] use_cpu: True use_openai_api: True [2024-04-08 15:59:15 +0800] [1584062] [INFO] Sanic Extensions: [2024-04-08 15:59:15 +0800] [1584062] [INFO] > injection [0 dependencies; 0 constants] [2024-04-08 15:59:15 +0800] [1584062] [INFO] > openapi [http://10.0.1.1:9777/docs] [2024-04-08 15:59:15 +0800] [1584062] [INFO] > http [2024-04-08 15:59:15 +0800] [1584062] [INFO] > templating [jinja2==3.1.2] Using CPU. Note: This module is much faster with a GPU. Using CPU. Note: This module is much faster with a GPU. [2024-04-08 15:59:23 +0800] [1584062] [ERROR] name 'corrupt_msg' is not defined Traceback (most recent call last): File "/dellnas/home/hutao/miniconda3/envs/QAnything/lib/python3.10/site-packages/sanic/worker/serve.py", line 117, in worker_serve return _serve_http_1( File "/dellnas/home/hutao/miniconda3/envs/QAnything/lib/python3.10/site-packages/sanic/server/runners.py", line 223, in _serve_http_1 loop.run_until_complete(app._server_event("init", "before")) File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete File "/dellnas/home/hutao/miniconda3/envs/QAnything/lib/python3.10/site-packages/sanic/app.py", line 1764, in _server_event await self.dispatch( File "/dellnas/home/hutao/miniconda3/envs/QAnything/lib/python3.10/site-packages/sanic/signals.py", line 208, in dispatch return await dispatch File "/dellnas/home/hutao/miniconda3/envs/QAnything/lib/python3.10/site-packages/sanic/signals.py", line 183, in _dispatch raise e File "/dellnas/home/hutao/miniconda3/envs/QAnything/lib/python3.10/site-packages/sanic/signals.py", line 167, in _dispatch retval = await maybe_coroutine File "/dellnas/home/hutao/miniconda3/envs/QAnything/lib/python3.10/site-packages/sanic/app.py", line 1315, in _listener await maybe_coro File "/dellnas/home/hutao/QAnything/qanything_kernel/qanything_server/sanic_api.py", line 178, in init_local_doc_qa local_doc_qa.init_cfg(args=args) File "/dellnas/home/hutao/QAnything/qanything_kernel/core/local_doc_qa.py", line 70, in init_cfg self.ocr_reader = easyocr.Reader(['ch_sim', 'en'], gpu=False) # 省显存 File "/dellnas/home/hutao/miniconda3/envs/QAnything/lib/python3.10/site-packages/easyocr/easyocr.py", line 184, in init LOGGER.warning(corrupt_msg) NameError: name 'corrupt_msg' is not defined [2024-04-08 15:59:23 +0800] [1582159] [ERROR] Not all workers acknowledged a successful startup. Shutting down.

One of your worker processes terminated before startup was completed. Please solve any errors experienced during startup. If you do not see an exception traceback in your error logs, try running Sanic in in a single process using --single-process or single_process=True. Once you are confident that the server is able to start without errors you can switch back to multiprocess mode. [2024-04-08 15:59:23 +0800] [1582159] [INFO] Killing Sanic-Server-0-0 [1584060] [2024-04-08 15:59:23 +0800] [1582159] [INFO] Killing Sanic-Server-1-0 [1584061] [2024-04-08 15:59:23 +0800] [1582159] [INFO] Killing Sanic-Server-2-0 [1584062] [2024-04-08 15:59:23 +0800] [1582159] [INFO] Killing Sanic-Server-3-0 [1584063] [2024-04-08 15:59:23 +0800] [1582159] [INFO] Server Stopped

期望行为 | Expected Behavior

No response

运行环境 | Environment

- OS:
- NVIDIA Driver:
- CUDA:
- docker:
- docker-compose:
- NVIDIA GPU:
- NVIDIA GPU Memory:

QAnything日志 | QAnything logs

No response

复现方法 | Steps To Reproduce

No response

备注 | Anything else?

No response

changqingla commented 6 months ago

使用的是教程里面的easyocr==1.7.1

oliviawang9 commented 6 months ago

遇到了差不多的问题, 请问解决了吗? FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.EasyOCR//model/temp.zip'

Running123 commented 6 months ago

一样的报错

changqingla commented 5 months ago

遇到了差不多的问题, 请问解决了吗? FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.EasyOCR//model/temp.zip'

可以从外面单独安装好easyocr

githubcust commented 5 months ago

下载 https://github.com/JaidedAI/EasyOCR/releases/download/pre-v1.1.6/craft_mlt_25k.zip https://github.com/JaidedAI/EasyOCR/releases/download/v1.3/zh_sim_g2.zip 解压后保存至~/.EasyOCR/model

guanyuwl commented 5 months ago

下载 https://github.com/JaidedAI/EasyOCR/releases/download/pre-v1.1.6/craft_mlt_25k.zip https://github.com/JaidedAI/EasyOCR/releases/download/v1.3/zh_sim_g2.zip 解压后保存至~/.EasyOCR/model

解决了,感谢!