Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions