siyuan-note/siyuan · error
ErrSpecTooNew
ErrSpecTooNew
Error message
attribute view spec is too new
What it means
ErrSpecTooNew means the attribute view file's storage spec version is higher than the running kernel supports — the data was written by a newer SiYuan version. Rendering, checking (CheckSpec), and related operations abort rather than misinterpret unknown fields or formats.
Solutions
- Upgrade SiYuan (kernel and frontend) to a version whose supported spec >= the file's spec
- Stop writing to the workspace with the older client to avoid corrupting newer data
- Restore matching-version data or re-export/re-create the attribute view if downgrade is mandatory
Defensive patterns
Strategy: try-catch
Validate before calling
if avSpec > maxSupportedSpec {
promptUpgradeClient()
} Try / catch
if err := renderAttrView(...); err != nil {
if errors.Is(err, av.ErrSpecTooNew) {
// surface language pack msg 215: ask user to upgrade SiYuan
}
} Prevention
- Keep all synced devices on the same or compatible SiYuan version
- Avoid downgrading clients on workspaces already written by newer builds
- Check spec version before programmatic writes
When it happens
Trigger: renderAttrView or CheckSpec reading a .av JSON whose spec field exceeds the kernel's current maximum; opening a synced workspace on a machine with an older SiYuan build; setGetBlockInfoError surfacing the failure to block info consumers.
Common situations: Downgrading the SiYuan client after another device already upgraded and wrote newer-spec attribute views; beta/insider build creating views an older release cannot parse; restoring an old snapshot over a newer workspace without rolling back the .av files.
Understand the failure class
Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.
Related errors
- attribute view spec is too new
- ErrRichTextSpecMismatch
- [/api/av/batchSetAttributeViewBlockAttrs] parameter [rowID]…
- at least one visible view is required
- attribute view content is unavailable
AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19).
Data as JSON: /api/errors/8ca05dca1fe0bdc6.
Report an issue: GitHub.
Appendix: source
Thrown at kernel/av/av.go:1391
}
}
return
}
func GetAttributeViewI18n(key string) string {
return util.AttrViewLangs[util.Lang][key].(string)
}
var (
ErrAttributeViewNotFound = errors.New("attribute view not found")
ErrInvalidAttributeViewID = errors.New("invalid attribute view id")
ErrInvalidBoxID = errors.New("invalid box id")
ErrViewNotFound = errors.New("view not found")
ErrKeyNotFound = errors.New("key not found")
ErrItemNotFound = errors.New("item not found")
ErrWrongLayoutType = errors.New("wrong layout type")
ErrInvalidColumnAlign = errors.New("invalid column align")
ErrSpecTooNew = errors.New("attribute view spec is too new")
ErrRichTextSpecMismatch = errors.New("attribute view rich text requires storage spec 9")
ErrFilterTooDeep = errors.New("filter nesting depth exceeds the maximum allowed")
)
const (
NodeAttrNameAvs = "custom-avs" // 用于标记块所属的属性视图,逗号分隔 av id
NodeAttrView = "custom-sy-av-view" // 用于标记块所属的属性视图视图 view id Database block support specified view https://github.com/siyuan-note/siyuan/issues/10443
NodeAttrVisibleViewIDs = "custom-sy-av-visible-views" // 用于标记数据库块显示的视图 ID,逗号分隔
NodeAttrContextFilter = "custom-sy-av-context-filter" // 用于保存数据库块独有的上下文筛选配置
NodeAttrViewStaticText = "custom-sy-av-s-text" // 用于标记块所属的属性视图静态文本 Database-bound block primary key supports setting static anchor text https://github.com/siyuan-note/siyuan/issues/10049
NodeAttrViewNames = "av-names" // 用于临时标记块所属的属性视图名称,空格分隔
)
View on GitHub (pinned to 9f775e8a12)