getsops/sops · error

YAML documents that are values are not supported

Error message

YAML documents that are values are not supported

What it means

Error "YAML documents that are values are not supported" thrown in getsops/sops.

Source

Thrown at stores/yaml/store.go:162

			valueTV, err := store.nodeToTreeValue(value, handleValueComments)
			if err != nil {
				return nil, err
			}
			branch = append(branch, sops.TreeItem{
				Key:   keyValue,
				Value: valueTV,
			})
			if handleValueComments {
				branch = store.appendCommentToMap(value.FootComment, branch)
			}
			branch = store.appendCommentToMap(key.FootComment, branch)
		}
	case yaml.ScalarNode:
		// A empty document with a document start marker without comments results in null
		if node.ShortTag() == "!!null" {
			return branch, nil
		}
		return nil, fmt.Errorf("YAML documents that are values are not supported")
	case yaml.AliasNode:
		branch, err = store.appendYamlNodeToTreeBranch(node.Alias, branch, false)
		if err != nil {
			// This should never happen since node.Alias was already successfully decoded before
			return nil, err
		}
	}
	if !commentsWereHandled {
		branch = store.appendCommentToMap(node.FootComment, branch)
	}
	return branch, nil
}

func (store Store) yamlDocumentNodeToTreeBranch(in yaml.Node) (sops.TreeBranch, error) {
	branch := make(sops.TreeBranch, 0)
	return store.appendYamlNodeToTreeBranch(&in, branch, false)
}

View on GitHub (pinned to 13442bb981)

When it happens

Trigger: Thrown at stores/yaml/store.go:162 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of getsops/sops@13442bb981 (2026-09-01). Data as JSON: /api/errors/fe76e71dff71e30f. Report an issue: GitHub.