{"record":{"id":"100edbda8d3539aa","repo":"siyuan-note/siyuan","slug":"conf-language-115","errorCode":null,"errorMessage":"Conf.Language(115)","messagePattern":"Conf\\.Language\\(115\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/export.go","lineNumber":1110,"sourceCode":"\t\treturn nil\n\t}); exportErr != nil {\n\t\tlogging.LogErrorf(\"export preview [%s] failed: %s\", id, exportErr)\n\t\treturn\n\t}\n\treturn\n}\n\nfunc ExportDocx(id, savePath string, removeAssets, merge bool, mergeHeadingOptions ...MergeHeadingOptions) (fullPath string, err error) {\n\tif err = prepareExportBlockAssets(id, merge); err != nil {\n\t\treturn\n\t}\n\terr = withExportReadLockByBlockID(id, func() error {\n\t\tpandocRuntime := util.GetPandocRuntime()\n\t\tif !util.IsValidPandocBin(pandocRuntime.BinPath) {\n\t\t\tutil.InitPandoc(Conf.Export.PandocBin)\n\t\t\tpandocRuntime = util.GetPandocRuntime()\n\t\t\tif !util.IsValidPandocBin(pandocRuntime.BinPath) {\n\t\t\t\treturn errors.New(Conf.Language(115))\n\t\t\t}\n\t\t}\n\n\t\ttmpDir := filepath.Join(util.TempDir, \"export\", gulu.Rand.String(7))\n\t\tif bt := getExportBlockTree(id); bt != nil && IsEncryptedBox(bt.BoxID) {\n\t\t\texportID, idErr := newManagedEncryptedExportID()\n\t\t\tif idErr != nil {\n\t\t\t\treturn idErr\n\t\t\t}\n\t\t\ttmpDir = filepath.Join(util.TempDir, \"export\", bt.BoxID, \"docx\", exportID)\n\t\t}\n\t\tif mkdirErr := os.MkdirAll(tmpDir, 0755); mkdirErr != nil {\n\t\t\treturn mkdirErr\n\t\t}\n\t\tdefer os.RemoveAll(tmpDir)\n\t\tname, content, exportErr := exportMarkdownHTML(id, tmpDir, true, merge, mergeHeadingOptions...)\n\t\tif exportErr != nil {\n\t\t\treturn exportErr","sourceCodeStart":1092,"sourceCodeEnd":1128,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/model/export.go#L1092-L1128","documentation":"ExportDocx (and other pandoc-based exports) require a working Pandoc executable. If util.GetPandocRuntime reports an invalid binary and re-initialization with Conf.Export.PandocBin still fails validation, the export aborts with i18n message 115: 'Please configure [Settings - Export - Pandoc - Path to Pandoc executable] first'.","triggerScenarios":"Calling the docx/pandoc export API when no Pandoc binary is found at the configured or default path, or the configured path points to a missing/corrupt/non-executable file.","commonSituations":"Fresh install without Pandoc configured; Pandoc uninstalled or moved after configuration; wrong custom path set in Settings - Export - Pandoc; bundled Pandoc missing on a portable install.","solutions":["Install Pandoc and set the correct path in Settings - Export - Pandoc - Path to Pandoc executable","Set conf Export.PandocBin to a valid pandoc binary path programmatically","Verify the binary exists and is executable (chmod +x on Unix) and matches the platform"],"exampleFix":"// before (conf)\n{\"export\": {\"pandocBin\": \"/opt/old-pandoc/pandoc\"}} // deleted binary\n// after\n{\"export\": {\"pandocBin\": \"/usr/bin/pandoc\"}}","handlingStrategy":"fallback","validationCode":"const bin = conf.export.pandocBin || defaultPandocPath;\nif (!fs.existsSync(bin)) {\n  notify('Configure [Settings - Export - Pandoc - Path to Pandoc executable] first');\n  return;\n}","typeGuard":null,"tryCatchPattern":"try { await exportDocx(id, savePath); }\ncatch (e) {\n  if (String(e).includes('Pandoc')) {\n    promptUserToInstallOrConfigurePandoc();\n  }\n}","preventionTips":["Install Pandoc and verify the configured path points to a valid executable","After Pandoc upgrade/reinstall, update the path in Settings - Export - Pandoc","Check pandoc availability with a version probe before offering docx export in plugins"],"tags":["export","pandoc","configuration"],"backgroundTag":"missing-dependency","analyzedSha":"9f775e8a12daef8255556097396f9b2739078892","analyzedAt":"2026-09-19T03:17:15.984Z","contentChangedAt":"2026-09-19T03:17:15.984Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}