siyuan-note/siyuan · error

attribute view group

Error message

attribute view group [%s] not found

What it means

When a groupID is supplied, GetAttributeViewPasteRows iterates the table view's groups to find the matching one and narrows it to *av.Table. If no group's ID equals groupID (or the matched group is not a Table), groupTable stays nil and this error is returned.

Solutions

  1. Re-read the current view's group list and use a valid group ID (or the group containing the start item)
  2. Omit/empty groupID if the paste target is not inside a specific group
  3. Refresh the frontend state so cached group IDs are re-fetched before pasting

Example fix

// before
rows, _, err := model.GetAttributeViewPasteRows(avID, viewID, oldGroupID, startID, 1)
// after
groupID := findGroupIDForItem(avID, viewID, startID) // re-resolve from current groups
rows, _, err := model.GetAttributeViewPasteRows(avID, viewID, groupID, startID, 1)
Defensive patterns

Strategy: validation

Validate before calling

const group = table.groups?.find(g => g.id === groupID)
if (!group) { throw new Error(`group ${groupID} not in current view`) }

Try / catch

rows, _, err := model.GetAttributeViewPasteRows(avID, viewID, groupID, startID, n)
if err != nil && strings.Contains(err.Error(), "group [") && strings.Contains(err.Error(), "] not found") {
    groupID = recomputeGroupID(avID, viewID, startID)
}

Prevention

When it happens

Trigger: Calling GetAttributeViewPasteRows with a groupID that no longer exists in the table view (group deleted/renamed) or that is not table-backed; stale groupID captured before regrouping.

Common situations: Paste target recorded before the user re-grouped the view, invalidating the old group ID; plugin passing a block ID instead of a group ID; grouped view where group IDs changed after data edit.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19). Data as JSON: /api/errors/f68568b5b4ca4aba. Report an issue: GitHub.

Appendix: source

Thrown at kernel/model/attribute_view_render.go:303

	viewable, attrView, err := RenderAttributeView(blockID, avID, viewID, query, 1, math.MaxInt, nil, false, false)
	if nil != err {
		return nil, nil, err
	}

	table, ok := viewable.(*av.Table)
	if !ok {
		return nil, nil, fmt.Errorf("attribute view [%s] is not a table", avID)
	}
	if "" != groupID {
		var groupTable *av.Table
		for _, group := range table.Groups {
			if group.GetID() == groupID {
				groupTable, _ = group.(*av.Table)
				break
			}
		}
		if nil == groupTable {
			return nil, nil, fmt.Errorf("attribute view group [%s] not found", groupID)
		}
		table = groupTable
	}

	rows, err := getAttributeViewPasteRowsFromTable(table, startItemID, count)
	if nil != err {
		return nil, nil, err
	}
	table.Rows = rows
	return table, getPasteInferableAttributeViewKeyIDs(attrView, getDependentRollupKeyIDs(attrView.ID)), nil
}

func getPasteInferableAttributeViewKeyIDs(attrView *av.AttributeView, dependentRollupKeyIDs map[string]struct{}) (ret []string) {
	unsafeKeyIDs := dependentRollupKeyIDs
	if nil == unsafeKeyIDs {
		unsafeKeyIDs = map[string]struct{}{}
	}
	for _, itemTemplate := range attrView.NewItemTemplates {

View on GitHub (pinned to 9f775e8a12)