Skip to content

BUG: process_workflow_file_with_markers crashes with JSONDecodeError on YAML workflow files #156

@devteamaegis

Description

@devteamaegis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions