siyuan-note/siyuan · error

attribute view [%s] is not a table

Error message

attribute view [%s] is not a table

What it means

Error "attribute view [%s] is not a table" thrown in siyuan-note/siyuan.

Source

Thrown at kernel/model/attribute_view_render.go:282

}

func RenderAttributeView(blockID, avID, viewID, query string, page, pageSize int, groupPaging map[string]any, createIfNotExist, ignoreRows bool) (viewable av.Viewable, attrView *av.AttributeView, err error) {
	viewable, attrView, _, err = RenderAttributeViewWithTarget(blockID, avID, viewID, query, page, pageSize, groupPaging, "", createIfNotExist, ignoreRows, "", "")
	return
}

// GetAttributeViewPasteRows 返回当前表格视图中从指定条目开始的连续行和可安全推断类型的空字段,供粘贴扩充行列。
func GetAttributeViewPasteRows(blockID, avID, viewID, groupID, query, startItemID string, count int) (
	table *av.Table, inferableKeyIDs []string, err error,
) {
	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

View on GitHub (pinned to 251596fc0d)

Solutions

  1. Run this operation only on attribute views using the table layout.
  2. Switch the view layout to table before retrying, or use the API appropriate for kanban/gallery layouts.

Example fix

In the database view menu, change the layout to Table, then repeat the paste/row operation.

When it happens

Trigger: A table-specific operation (such as pasting rows) is invoked on a kanban or gallery attribute view.

Common situations: Occurs when a table-only operation (row paste, group query) is issued against an attribute view whose current layout is kanban or gallery.


AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12). Data as JSON: /api/errors/a4956a8e1e8cabc5. Report an issue: GitHub.