workflow-use
workflow-use copied to clipboard
BUG: process_workflow_file_with_markers crashes with JSONDecodeError on YAML workflow files
What breaks
Calling `process_workflow_file_with_markers()` on any `.workflow.yaml` file raises `json.decoder.JSONDecodeError` before any business logic executes. Since `WorkflowStorageService` always serialises workflows to YAML (the default file format), this utility is broken for all normal workflow files.
Trigger input
Any `*.workflow.yaml` file written by the storage service, e.g.:
process_workflow_file_with_markers("my.workflow.yaml", output_path="out.json")
Traceback
File ".../workflow_use/healing/variable_utils.py", line 62, in process_workflow_file_with_markers
workflow_data = json.load(f)
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Root cause
Line 62 of variable_utils.py unconditionally calls json.load(f) regardless of the file extension, but the storage layer always produces YAML.