{"record":{"id":"46d6a40a28adc7d3","repo":"siyuan-note/siyuan","slug":"conf-language-14-pandoc-output-s","errorCode":null,"errorMessage":"Conf.Language(14) (pandoc output: %s)","messagePattern":"Conf\\.Language\\(14\\) \\(pandoc output: (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/export.go","lineNumber":1162,"sourceCode":"\t\tfilterPath, filterErr := writePandocDocxFilter(tmpDir)\n\t\tif nil != filterErr {\n\t\t\treturn filterErr\n\t\t}\n\t\targs = appendBuiltinPandocDocxFilter(args, filterPath)\n\n\t\tif !hasPandocOption(args, \"--reference-doc\") && \"\" != pandocRuntime.TemplatePath {\n\t\t\targs = append(args, \"--reference-doc\", pandocRuntime.TemplatePath)\n\t\t}\n\n\t\tpandoc := exec.Command(pandocRuntime.BinPath, args...)\n\t\tgulu.CmdAttr(pandoc)\n\t\tpandoc.Stdin = bytes.NewBufferString(content)\n\t\toutput, pandocErr := pandoc.CombinedOutput()\n\t\tif pandocErr != nil {\n\t\t\targStr := strings.Join(args, \" \")\n\t\t\tmsg := gulu.DecodeCmdOutput(output)\n\t\t\tlogging.LogErrorf(\"export docx [%s] failed: %s\", argStr, msg)\n\t\t\treturn fmt.Errorf(Conf.Language(14), msg)\n\t\t}\n\n\t\tfullPath = filepath.Join(savePath, name+\".docx\")\n\t\tfullPath = util.GetUniqueFilename(fullPath)\n\t\tif copyErr := filelock.Copy(tmpDocxPath, fullPath); copyErr != nil {\n\t\t\tlogging.LogErrorf(\"export docx failed: %s\", copyErr)\n\t\t\treturn fmt.Errorf(Conf.Language(14), copyErr)\n\t\t}\n\n\t\tif tmpAssets := filepath.Join(tmpDir, \"assets\"); !removeAssets && gulu.File.IsDir(tmpAssets) {\n\t\t\tif copyErr := filelock.Copy(tmpAssets, filepath.Join(savePath, \"assets\")); copyErr != nil {\n\t\t\t\tlogging.LogErrorf(\"export docx failed: %s\", copyErr)\n\t\t\t\treturn fmt.Errorf(Conf.Language(14), copyErr)\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t})\n\tif err != nil {","sourceCodeStart":1144,"sourceCodeEnd":1180,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/kernel/model/export.go#L1144-L1180","documentation":"During docx export, SiYuan pipes Markdown content into the Pandoc process and reads its combined output. If Pandoc exits non-zero, the localized template Conf.Language(14) ('Export failed: %s') is filled with Pandoc's stderr/stdout message and returned. The raw message is also logged via logging.LogErrorf.","triggerScenarios":"ExportDocx conversion step: pandoc.CombinedOutput() returns an error, e.g. unsupported Markdown construct, invalid Pandoc arguments, corrupted input content, or the Pandoc process crashes mid-conversion.","commonSituations":"Pandoc version mismatch producing unrecognized CLI flags; documents with constructs Pandoc cannot convert; memory exhaustion while converting very large documents; locale/encoding issues on the host.","solutions":["Read the %s portion of the error — it contains Pandoc's own output; fix the documented Pandoc issue.","Check kernel logs (logging.LogErrorf 'export docx ... failed') for the full Pandoc message and args.","Upgrade or downgrade Pandoc to a version compatible with the SiYuan-exported arguments.","Retry export after removing recently added unusual content (embeds, exotic blocks) to isolate the failing construct."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await exportDocx({id, savePath});\n} catch (e) {\n  // e.msg contains Pandoc's own output; surface it to the user\n  showExportError(e.msg);\n}","preventionTips":["Keep Pandoc updated to a version tested with SiYuan","Check kernel logs for 'export docx ... failed' to see the full Pandoc output","Isolate failing documents by exporting smaller subsets"],"tags":["pandoc","export","docx","process-failure"],"backgroundTag":"command-not-found","analyzedSha":"8641553a1f07374001902d3ce773285db1292b2d","analyzedAt":"2026-09-11T16:08:28.414Z","contentChangedAt":"2026-09-11T16:08:28.414Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}