DIY failed to import YML after importing several items, and the creation of the YML application failed #14270

Closed
opened 2026-02-21 19:16:27 -05:00 by yindo · 1 comment
Owner

Originally created by @shenjian123 on GitHub (May 28, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.4.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

{"id": "bee2ff0d-821f-4f7c-9302-b1dc770036ce", "status": "failed", "app_id": null, "app_mode": null, "current_dsl_version": "0.3.0", "imported_dsl_version": "", "error": "yaml_content is required when import_mode is yaml-content"}
interface /console/api/apps/imports。
The same YML could be imported before, but it cannot be imported now

✔️ Expected Behavior

solve a problem

Actual Behavior

No response

Originally created by @shenjian123 on GitHub (May 28, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.4.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce {"id": "bee2ff0d-821f-4f7c-9302-b1dc770036ce", "status": "failed", "app_id": null, "app_mode": null, "current_dsl_version": "0.3.0", "imported_dsl_version": "", "error": "yaml_content is required when import_mode is yaml-content"} interface /console/api/apps/imports。 The same YML could be imported before, but it cannot be imported now ### ✔️ Expected Behavior solve a problem ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:16:27 -05:00
yindo closed this issue 2026-02-21 19:16:27 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (May 28, 2025):

The error message "yaml_content is required when import_mode is yaml-content" indicates that the import process expects the YAML content to be provided directly, but it was missing from the request. This can happen if the import mode is set to "yaml-content" but the actual YAML data is not included in the payload. The relevant import logic in Dify checks for this and fails if the content is absent or empty, even if the same YML file worked previously [source].

To resolve this, ensure that when you import via the API or UI, the YAML content is actually being sent as part of the request body under the correct field. If you are using a script or a tool to automate imports, double-check that the payload includes the "yaml_content" key with the full YAML data.

If the YAML content is present but the error persists, check for formatting issues in your YAML file. Common problems include incorrect indentation (use spaces, not tabs), missing spaces after colons, or other syntax errors. You can use a YAML validator to check your file for these issues [source].

There are no recent changes or known issues in the repository that specifically affect YML import functionality in version 1.4.1, and no similar threads were found. If the problem started recently, consider whether anything changed in your import process, environment, or the way the API is called.

If you continue to encounter issues, providing the exact API request payload or more details about how you are performing the import may help identify the root cause.

To reply, just mention my name @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (May 28, 2025): <!-- Answer --> The error message "yaml_content is required when import_mode is yaml-content" indicates that the import process expects the YAML content to be provided directly, but it was missing from the request. This can happen if the import mode is set to "yaml-content" but the actual YAML data is not included in the payload. The relevant import logic in Dify checks for this and fails if the content is absent or empty, even if the same YML file worked previously [[source]](https://github.com/langgenius/dify/blob/main/api/controllers/console/app/app_import.py). To resolve this, ensure that when you import via the API or UI, the YAML content is actually being sent as part of the request body under the correct field. If you are using a script or a tool to automate imports, double-check that the payload includes the "yaml_content" key with the full YAML data. If the YAML content is present but the error persists, check for formatting issues in your YAML file. Common problems include incorrect indentation (use spaces, not tabs), missing spaces after colons, or other syntax errors. You can use a YAML validator to check your file for these issues [[source]](https://github.com/crazywoola/dify-docs-mintlify/blob/main/plugin-dev-en/0211-getting-started-by-prompt.mdx). There are no recent changes or known issues in the repository that specifically affect YML import functionality in version 1.4.1, and no similar threads were found. If the problem started recently, consider whether anything changed in your import process, environment, or the way the API is called. If you continue to encounter issues, providing the exact API request payload or more details about how you are performing the import may help identify the root cause. <!-- Dosu Comment Footer --> *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/d148f391-a85f-4867-ad85-9d223fbf5bab?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/d148f391-a85f-4867-ad85-9d223fbf5bab?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/d148f391-a85f-4867-ad85-9d223fbf5bab?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/d148f391-a85f-4867-ad85-9d223fbf5bab?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d148f391-a85f-4867-ad85-9d223fbf5bab?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/d148f391-a85f-4867-ad85-9d223fbf5bab?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d148f391-a85f-4867-ad85-9d223fbf5bab?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/20383)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#14270