grafana/k6 · error

fromLine must be less than or equal to toLine

Error message

fromLine must be less than or equal to toLine

What it means

Error "fromLine must be less than or equal to toLine" thrown in grafana/k6.

Source

Thrown at internal/js/modules/k6/experimental/csv/module.go:363

	if v := obj.Get("skipFirstLine"); v != nil {
		options.SkipFirstLine = v.ToBoolean()
	}

	if v := obj.Get("fromLine"); v != nil {
		options.FromLine = null.IntFrom(v.ToInteger())
	}

	if v := obj.Get("toLine"); v != nil {
		options.ToLine = null.IntFrom(v.ToInteger())
	}

	if v := obj.Get("asObjects"); v != nil {
		options.AsObjects = null.BoolFrom(v.ToBoolean())
	}

	if options.FromLine.Valid && options.ToLine.Valid && options.FromLine.Int64 >= options.ToLine.Int64 {
		return options, fmt.Errorf("fromLine must be less than or equal to toLine")
	}

	return options, nil
}

View on GitHub (pinned to 93accf6570)

When it happens

Trigger: Thrown at internal/js/modules/k6/experimental/csv/module.go:363 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of grafana/k6@93accf6570 (2026-08-15). Data as JSON: /api/errors/6815e4de362fa9fe. Report an issue: GitHub.