本地Docker compose部署报FileNotFoundError: [Errno 2] No such file or directory: '' 无法正常启动 #39

Closed
opened 2026-02-16 05:18:59 -05:00 by yindo · 1 comment
Owner

Originally created by @xiaomamyx on GitHub (May 21, 2025).

问题描述

本地部署报FileNotFoundError: [Errno 2] No such file or directory: '' 无法正常启动
docker-api-1 服务一直处于重启状态

Traceback (most recent call last):
2025-05-21 17:28:53 File "/app/api/.venv/bin/flask", line 10, in
2025-05-21 17:28:53 sys.exit(main())
2025-05-21 17:28:53 ^^^^^^
2025-05-21 17:28:53 File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 1129, in main
2025-05-21 17:28:53 cli.main()
2025-05-21 17:28:53 File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1363, in main
2025-05-21 17:28:53 rv = self.invoke(ctx)
2025-05-21 17:28:53 ^^^^^^^^^^^^^^^^
2025-05-21 17:28:53 File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1824, in invoke
2025-05-21 17:28:53 cmd_name, cmd, args = self.resolve_command(ctx, args)
2025-05-21 17:28:53 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-05-21 17:28:53 File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1871, in resolve_command
2025-05-21 17:28:53 cmd = self.get_command(ctx, cmd_name)
2025-05-21 17:28:53 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-05-21 17:28:53 File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 631, in get_command
2025-05-21 17:28:53 app = info.load_app()
2025-05-21 17:28:53 ^^^^^^^^^^^^^^^
2025-05-21 17:28:53 File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 349, in load_app
2025-05-21 17:28:53 app = locate_app(import_name, name)
2025-05-21 17:28:53 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-05-21 17:28:53 File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 245, in locate_app
2025-05-21 17:28:53 import(module_name)
2025-05-21 17:28:53 File "/app/api/app.py", line 37, in
2025-05-21 17:28:53 app = create_app()
2025-05-21 17:28:53 ^^^^^^^^^^^^
2025-05-21 17:28:53 File "/app/api/app_factory.py", line 32, in create_app
2025-05-21 17:28:53 initialize_extensions(app)
2025-05-21 17:28:53 File "/app/api/app_factory.py", line 96, in initialize_extensions
2025-05-21 17:28:53 ext.init_app(app)
2025-05-21 17:28:53 File "/app/api/extensions/ext_logging.py", line 18, in init_app
2025-05-21 17:28:53 os.makedirs(log_dir, exist_ok=True)
2025-05-21 17:28:53 File "", line 225, in makedirs
2025-05-21 17:28:53 FileNotFoundError: [Errno 2] No such file or directory: ''

页面链接

https://github.com/langgenius/dify-docs-mintlify/blob/main/plugin-dev-zh/0331-faq.mdx

建议修改

建议修复此问题

Originally created by @xiaomamyx on GitHub (May 21, 2025). ## 问题描述 本地部署报FileNotFoundError: [Errno 2] No such file or directory: '' 无法正常启动 [docker-api-1](dify-api:1.4.0) 服务一直处于重启状态 Traceback (most recent call last): 2025-05-21 17:28:53 File "/app/api/.venv/bin/flask", line 10, in <module> 2025-05-21 17:28:53 sys.exit(main()) 2025-05-21 17:28:53 ^^^^^^ 2025-05-21 17:28:53 File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 1129, in main 2025-05-21 17:28:53 cli.main() 2025-05-21 17:28:53 File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1363, in main 2025-05-21 17:28:53 rv = self.invoke(ctx) 2025-05-21 17:28:53 ^^^^^^^^^^^^^^^^ 2025-05-21 17:28:53 File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1824, in invoke 2025-05-21 17:28:53 cmd_name, cmd, args = self.resolve_command(ctx, args) 2025-05-21 17:28:53 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-05-21 17:28:53 File "/app/api/.venv/lib/python3.12/site-packages/click/core.py", line 1871, in resolve_command 2025-05-21 17:28:53 cmd = self.get_command(ctx, cmd_name) 2025-05-21 17:28:53 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-05-21 17:28:53 File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 631, in get_command 2025-05-21 17:28:53 app = info.load_app() 2025-05-21 17:28:53 ^^^^^^^^^^^^^^^ 2025-05-21 17:28:53 File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 349, in load_app 2025-05-21 17:28:53 app = locate_app(import_name, name) 2025-05-21 17:28:53 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-05-21 17:28:53 File "/app/api/.venv/lib/python3.12/site-packages/flask/cli.py", line 245, in locate_app 2025-05-21 17:28:53 __import__(module_name) 2025-05-21 17:28:53 File "/app/api/app.py", line 37, in <module> 2025-05-21 17:28:53 app = create_app() 2025-05-21 17:28:53 ^^^^^^^^^^^^ 2025-05-21 17:28:53 File "/app/api/app_factory.py", line 32, in create_app 2025-05-21 17:28:53 initialize_extensions(app) 2025-05-21 17:28:53 File "/app/api/app_factory.py", line 96, in initialize_extensions 2025-05-21 17:28:53 ext.init_app(app) 2025-05-21 17:28:53 File "/app/api/extensions/ext_logging.py", line 18, in init_app 2025-05-21 17:28:53 os.makedirs(log_dir, exist_ok=True) 2025-05-21 17:28:53 File "<frozen os>", line 225, in makedirs 2025-05-21 17:28:53 FileNotFoundError: [Errno 2] No such file or directory: '' ## 页面链接 https://github.com/langgenius/dify-docs-mintlify/blob/main/plugin-dev-zh/0331-faq.mdx ## 建议修改 建议修复此问题 <!-- 感谢您对文档质量的关注! -->
yindo closed this issue 2026-02-16 05:18:59 -05:00
Author
Owner

@AllenWriter commented on GitHub (May 22, 2025):

Hi, this is the documentation repo, not a technical support channel.
I’m afraid unable to address the issue you mentioned here.
You can submit your request or issue to the main Dify GitHub repository.

@AllenWriter commented on GitHub (May 22, 2025): Hi, this is the documentation repo, not a technical support channel. I’m afraid unable to address the issue you mentioned here. You can submit your request or issue to the main [Dify GitHub repository](https://github.com/langgenius/dify).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-docs#39