sipeed/picoclaw · error

table must have at least header and separator rows

Error message

table must have at least header and separator rows

What it means

Error "table must have at least header and separator rows" thrown in sipeed/picoclaw.

Source

Thrown at pkg/channels/teams_webhook/teams_webhook.go:314

		lastEnd = match[1]
	}

	// Text after the last table
	if lastEnd < len(content) {
		segments = append(segments, contentSegment{
			content: content[lastEnd:],
			isTable: false,
		})
	}

	return segments
}

// parseMarkdownTable converts a markdown table string to an Adaptive Card Table element.
func parseMarkdownTable(tableStr string) (adaptivecard.Element, error) {
	lines := strings.Split(strings.TrimSpace(tableStr), "\n")
	if len(lines) < 2 {
		return adaptivecard.Element{}, fmt.Errorf("table must have at least header and separator rows")
	}

	// Track header content length per column for width calculation
	var headerLengths []int

	// Parse all rows (header + data rows, skip separator)
	var allRows [][]adaptivecard.TableCell
	for i, line := range lines {
		// Skip separator row (contains only |, -, :, and spaces)
		if i == 1 && isSeparatorRow(line) {
			continue
		}

		cells := parseTableRow(line)
		if len(cells) == 0 {
			continue
		}

View on GitHub (pinned to 49183d7e8d)

When it happens

Trigger: Thrown at pkg/channels/teams_webhook/teams_webhook.go:314 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/ef3b7aa800b4cd40. Report an issue: GitHub.