sipeed/picoclaw · error
failed to create table: %w
Error message
failed to create table: %w
What it means
Error "failed to create table: %w" thrown in sipeed/picoclaw.
Source
Thrown at pkg/channels/teams_webhook/teams_webhook.go:366
Type: adaptivecard.TypeTableCell,
Items: []*adaptivecard.Element{&textBlock},
}
tableCells = append(tableCells, cell)
}
allRows = append(allRows, tableCells)
}
if len(allRows) == 0 {
return adaptivecard.Element{}, fmt.Errorf("no valid rows found in table")
}
// Create table with first row as headers
firstRowAsHeaders := true
showGridLines := true
table, err := adaptivecard.NewTableFromTableCells(allRows, 0, firstRowAsHeaders, showGridLines)
if err != nil {
return adaptivecard.Element{}, fmt.Errorf("failed to create table: %w", err)
}
// Set column widths based on header content length
table.Columns = calculateColumnWidths(headerLengths)
return table, nil
}
// calculateColumnWidths creates TableColumnDefinition entries with widths
// proportional to the max content length of each column.
func calculateColumnWidths(maxLengths []int) []adaptivecard.Column {
if len(maxLengths) == 0 {
return nil
}
// Use content length as relative weight, with a minimum of 1
columns := make([]adaptivecard.Column, len(maxLengths))
for i, length := range maxLengths {View on GitHub (pinned to 49183d7e8d)
When it happens
Trigger: Thrown at pkg/channels/teams_webhook/teams_webhook.go:366 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/1d91636ecb63b564.
Report an issue: GitHub.