Tencent/WeKnora · error
PaddleOCR-VL error %d: %s
Error message
PaddleOCR-VL error %d: %s
What it means
The PaddleOCR-VL API responded successfully but reported a non-zero ErrorCode in callLayoutParsing; the code and message are embedded and represent application-level failures such as unsupported fileType or OCR processing errors.
Source
Thrown at internal/infrastructure/docparser/paddleocr_vl_converter.go:187
return "", nil, fmt.Errorf("HTTP request: %w", err)
}
defer resp.Body.Close()
respBody, err := io.ReadAll(resp.Body)
if err != nil {
return "", nil, fmt.Errorf("read response body: %w", err)
}
if resp.StatusCode != http.StatusOK {
return "", nil, fmt.Errorf("PaddleOCR-VL API status %d: %s", resp.StatusCode, string(respBody))
}
var result paddleOCRVLResponse
if err := json.Unmarshal(respBody, &result); err != nil {
return "", nil, fmt.Errorf("decode response: %w", err)
}
if result.ErrorCode != 0 {
return "", nil, fmt.Errorf("PaddleOCR-VL error %d: %s", result.ErrorCode, result.ErrorMsg)
}
pages := result.Result.LayoutParsingResults
if len(pages) == 0 {
logger.Errorf(context.Background(), "[PaddleOCR-VL] response has no layoutParsingResults")
return "", nil, nil
}
// Merge per-page markdown and image dicts into one document.
texts := make([]string, 0, len(pages))
images := make(map[string]string)
for _, p := range pages {
if t := strings.TrimSpace(p.Markdown.Text); t != "" {
texts = append(texts, p.Markdown.Text)
}
for path, data := range p.Markdown.Images {
if _, ok := images[path]; !ok {
images[path] = dataView on GitHub (pinned to 988cbb0330)
Solutions
- Match the embedded ErrorCode against PaddleOCR-VL docs
- Correct fileType/engine parameters as indicated
- Resubmit if the error is transient on the service side
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/infrastructure/docparser/paddleocr_vl_converter.go:187 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/c0acef5668129aea.
Report an issue: GitHub.