OpenBMB/ChatDev · error · WorkflowExecutionError
Failed to copy workflow file
Error message
Failed to copy workflow file
What it means
copy_workflow reads the source file and writes it to the target inside one try/except; any IO failure (source unreadable, target unwritable, disk full) is logged and re-raised as WorkflowExecutionError with source/target details.
Source
Thrown at server/services/workflow_storage.py:196
raise ResourceNotFoundError(
"Workflow file not found",
resource_type="workflow",
resource_id=source_safe,
)
if target_path.exists():
raise ResourceConflictError(
"Target workflow already exists",
resource_type="workflow",
resource_id=target_safe,
)
logger = get_server_logger()
try:
target_path.write_text(source_path.read_text(encoding="utf-8"), encoding="utf-8")
except Exception as exc:
logger.log_exception(exc, f"Failed to copy workflow file {source_safe} to {target_safe}")
raise WorkflowExecutionError(
"Failed to copy workflow file",
details={"source": source_safe, "target": target_safe},
)
logger.info(
"Workflow file copied",
log_type=LogType.WORKFLOW,
source=source_safe,
target=target_safe,
action="copy",
)
View on GitHub (pinned to 4fb2db0ea9)
Solutions
- Check logs for the underlying exception
- Verify read permission on source and write permission on the directory
- Retry once after re-validating both files' existence
- Free disk space
Example fix
# before
copy_workflow_file(sid, src, tgt)
# after
try:
copy_workflow_file(sid, src, tgt)
except WorkflowExecutionError:
if not workflow_exists(sid, src):
raise ResourceGone(src)
raise Defensive patterns
Strategy: try-catch
Validate before calling
assert (directory/src).is_file() and os.access(directory, os.W_OK)
Try / catch
try:
copy_workflow_file(sid, src, tgt)
except WorkflowExecutionError as e:
handle_io_failure(e.details) # check source gone vs perms vs disk Prevention
- Verify read+write perms at startup
- Retry once after re-validating existence
- Monitor disk space
When it happens
Trigger: Permissions changed between the existence check and the read/write; source deleted concurrently (TOCTOU); disk full; read-only volume for the target.
Common situations: Container with read-only workflows mount; concurrent deletion; quota exhausted.
Related errors
- Failed to save workflow file
- Destination already exists: {destination}
- Failed to rename workflow file
- Failed to update workflow id after rename
- 1
AI-assisted analysis of OpenBMB/ChatDev@4fb2db0ea9 (2026-08-27).
Data as JSON: /api/errors/77fc3bea5a428db9.
Report an issue: GitHub.