Skip to main content

MergeConflictError

Defined in the auto module.
Exception Raised when --merge targets an existing but un-parseable YAML file. Before raising, the wrapper writes a collision-safe backup of the original so no data is lost, then propagates out of convert_and_save to the CLI — no write happens and the user’s file is preserved. Inherits from the built-in Exception.

When it is raised

AutoGenerator.merge_with_existing_agents and WorkflowAutoGenerator.merge_with_existing_workflow catch yaml.YAMLError explicitly and raise MergeConflictError. OSError / PermissionError propagate unchanged.

Message

If the backup copy itself fails (shutil.copy2 error), the message is instead:

Resolution

Fix the reported parse error in your YAML, or re-run without --merge to regenerate the file from scratch.

Usage

Source

View on GitHub

praisonai/auto.py

Auto Generator

Merge safety (CLI)

Auto-Generator Safety

merge_with_existing_agents