Tencent/WeKnora · error

PaddleOCR-VL Cloud fetch results: %w

Error message

PaddleOCR-VL Cloud fetch results: %w

What it means

Once polling yields a result JSONL URL, Read calls fetchResults to download and parse the JSONL (markdown and image references). Failures downloading that URL or decoding its contents are wrapped as 'PaddleOCR-VL Cloud fetch results'. The job completed but the final artifacts could not be retrieved or interpreted.

Source

Thrown at internal/infrastructure/docparser/paddleocr_vl_cloud_converter.go:78

		return &types.ReadResult{Error: "no file content provided"}, nil
	}

	logger.Infof(context.Background(), "[PaddleOCR-VL Cloud] Parsing file=%s size=%d model=%s",
		req.FileName, len(content), c.model)

	jobID, err := c.submitJob(ctx, req, content)
	if err != nil {
		return nil, fmt.Errorf("PaddleOCR-VL Cloud submit: %w", err)
	}

	jsonlURL, err := c.pollJob(ctx, jobID)
	if err != nil {
		return nil, fmt.Errorf("PaddleOCR-VL Cloud poll: %w", err)
	}

	mdContent, imagesURL, err := c.fetchResults(jsonlURL)
	if err != nil {
		return nil, fmt.Errorf("PaddleOCR-VL Cloud fetch results: %w", err)
	}

	mdContent = normalizeHTMLTables(mdContent)

	imageRefs := c.downloadImages(mdContent, imagesURL)
	mdContent, imageRefs = ensureOriginalImageRef(req, mdContent, imageRefs)

	logger.Infof(context.Background(), "[PaddleOCR-VL Cloud] Parsed successfully, markdown=%d chars, images=%d",
		len(mdContent), len(imageRefs))

	return &types.ReadResult{
		MarkdownContent: mdContent,
		ImageRefs:       imageRefs,
	}, nil
}

func (c *PaddleOCRVLCloudReader) optionalPayload() map[string]interface{} {
	// Shared with the self-hosted engine so both produce identical output.

View on GitHub (pinned to 988cbb0330)

Solutions

  1. Inspect the wrapped cause: HTTP status vs. JSONL parse failure
  2. If the result URL expired, re-run with a shorter poll gap or fetch results immediately after completion
  3. Validate the JSONL schema against the current PaddleOCR-VL API docs (check for API version changes)
  4. Retry the fetch — result downloads from object storage are often transient failures
  5. If results are genuinely empty, verify the input document actually contains extractable content
Defensive patterns

Strategy: retry

Validate before calling

if jsonlURL == "" {
    return errors.New("job completed but no result URL returned")
}
u, err := url.Parse(jsonlURL)
if err != nil || u.Scheme == "" { return fmt.Errorf("invalid result URL: %q", jsonlURL) }

Type guard

func isFetchResultsFailure(err error) bool {
    return err != nil && strings.Contains(err.Error(), "PaddleOCR-VL Cloud fetch results")
}

Try / catch

out, err := reader.Read(ctx, req)
if isFetchResultsFailure(err) {
    out, err = retryWithBackoff(3, reader.Read, ctx, req) // result downloads are often transient
}
if err != nil { return err }

Prevention

When it happens

Trigger: Read -> fetchResults fails: the JSONL URL returns non-200, the result download times out, the JSONL body is empty/malformed and cannot be parsed, or required result fields are missing.

Common situations: Result URLs expiring quickly (signed URL TTL) because polling finished long after completion; transient object-storage errors; the cloud API changed its JSONL schema after a version bump; empty results for a document PaddleOCR could not actually extract.

Related errors


AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02). Data as JSON: /api/errors/c508792903d6d887. Report an issue: GitHub.