{"record":{"id":"21a266aee1f5a8f3","repo":"Tencent/WeKnora","slug":"anydoc-binding-not-built-into-this-binary","errorCode":null,"errorMessage":"anydoc: binding not built into this binary","messagePattern":"anydoc: binding not built into this binary","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/infrastructure/docparser/anydoc/anydoc.go","lineNumber":80,"sourceCode":"\tSection string\n}\n\n// Options tunes a single conversion.\ntype Options struct {\n\t// Format names the parser explicitly (\"docx\", \"csv\", ...). Empty means\n\t// the format is detected from the content, which every format except\n\t// CSV carries a signature for.\n\tFormat string\n\t// WithAssets extracts embedded images and renders them in place in the\n\t// markdown using anydoc's official GFM serializer (asset images are\n\t// rewritten to `images/image-N.ext` links first). Ignored for PDF.\n\tWithAssets bool\n}\n\n// ErrUnavailable is returned by Convert when the binding is not linked into\n// this build. Callers that can fall back to another engine should check for it\n// with errors.Is.\nvar ErrUnavailable = errors.New(\"anydoc: binding not built into this binary\")\n\n// supportedExtensions are the file types anydoc converts, mapped to the format\n// name its parser selector uses. The list is static so that engine metadata\n// (file types shown in the UI) is identical whether or not the binding is\n// linked in.\nvar supportedExtensions = map[string]string{\n\t\"doc\":  \"doc\",\n\t\"docx\": \"docx\",\n\t\"docm\": \"docx\",\n\t\"odt\":  \"odt\",\n\t\"rtf\":  \"rtf\",\n\t\"ppt\":  \"ppt\",\n\t\"pptx\": \"pptx\",\n\t\"pptm\": \"pptx\",\n\t\"odp\":  \"odp\",\n\t\"xls\":  \"xlsx\",\n\t\"xlsx\": \"xlsx\",\n\t\"xlsm\": \"xlsx\",","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/infrastructure/docparser/anydoc/anydoc.go#L62-L98","documentation":"Sentinel error returned by anydoc Convert when the cgo/native anydoc binding was not linked into the compiled binary. It fires unconditionally at the top of Convert via backendAvailable(); the wrapped backendUnavailableReason() explains why (e.g. build tag or missing shared library).","triggerScenarios":"Thrown at internal/infrastructure/docparser/anydoc/anydoc.go:80 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rebuild the binary with the anydoc build tag / CGO enabled so the native parser binding is linked in","Install the anydoc native library the binding expects and ensure it is on the library path","Check backendUnavailableReason() output in the wrapped error for the specific build deficiency","Route document conversion to a build/deployment that includes the anydoc binding"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"988cbb03305e055d8ebb7d46d9ac6cc0803cd074","analyzedAt":"2026-09-02T14:41:08.344Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}