{"record":{"id":"d83816e4d00bba6c","repo":"siyuan-note/siyuan","slug":"this-is-not-a-valid-data-archive-if-the-archive-w","errorCode":null,"errorMessage":"This is not a valid Data archive. If the archive was exported from [Documents], please import it from [Documents]","messagePattern":"This is not a valid Data archive\\. If the archive was exported from \\[Documents\\], please import it from \\[Documents\\]","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/import.go","lineNumber":1157,"sourceCode":"\n\tlogging.LogInfof(\"import data from [%s]\", zipPath)\n\tbaseName := filepath.Base(zipPath)\n\text := filepath.Ext(baseName)\n\tbaseName = strings.TrimSuffix(baseName, ext)\n\tunzipPath := filepath.Join(filepath.Dir(zipPath), baseName)\n\terr = gulu.Zip.Unzip(zipPath, unzipPath)\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer os.RemoveAll(unzipPath)\n\n\tfiles, err := filepath.Glob(filepath.Join(unzipPath, \"*/*.sy\"))\n\tif err != nil {\n\t\tlogging.LogErrorf(\"check data.zip failed: %s\", err)\n\t\treturn errors.New(\"check data.zip failed\")\n\t}\n\tif 0 < len(files) {\n\t\treturn errors.New(Conf.Language(198))\n\t}\n\tdirs, err := os.ReadDir(unzipPath)\n\tif err != nil {\n\t\tlogging.LogErrorf(\"check data.zip failed: %s\", err)\n\t\treturn errors.New(\"check data.zip failed\")\n\t}\n\tif 1 != len(dirs) {\n\t\treturn errors.New(Conf.Language(198))\n\t}\n\n\ttmpDataPath := filepath.Join(unzipPath, dirs[0].Name())\n\ttmpDataEmojisPath := filepath.Join(tmpDataPath, \"emojis\")\n\tfilelock.Walk(tmpDataEmojisPath, func(path string, d fs.DirEntry, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif d == nil {\n\t\t\treturn nil","sourceCodeStart":1139,"sourceCodeEnd":1175,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/afa823b6b4e4f183511e0bc0a3be93caa94c7c97/kernel/model/import.go#L1139-L1175","documentation":"Error \"This is not a valid Data archive. If the archive was exported from [Documents], please import it from [Documents]\" thrown in siyuan-note/siyuan.","triggerScenarios":"Thrown at kernel/model/import.go:1157 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["If this archive was exported from the document tree, import it via Document Tree - More - Import Notebook instead","Use the Data archive (exported from Settings - Export - Data) when importing through Settings"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"afa823b6b4e4f183511e0bc0a3be93caa94c7c97","analyzedAt":"2026-08-18T17:04:10.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}