SubtitleEdit/subtitleedit · error · PlatformNotSupportedException

PaddleOCR is not available for Linux ARM64.

Error message

PaddleOCR is not available for Linux ARM64.

What it means

PlatformNotSupportedException thrown by PaddleOcrDownloadService.DownloadEngineCpu when running on Linux ARM64, because PaddleOCR ships no ARM64 Linux engine build. The message names the missing combination explicitly.

Source

Thrown at src/ui/Logic/Download/PaddleOcrDownloadService.cs:44

    {
        _httpClient = httpClient;
    }

    public async Task DownloadModels(string destinationFileName, IProgress<float>? progress, CancellationToken cancellationToken)
    {
        var url = DownloadModelsUrl;
        await DownloadHelper.DownloadFileAsync(_httpClient, url, destinationFileName, progress, cancellationToken);
    }

    public async Task DownloadEngineCpu(string destinationFileName, IProgress<float>? progress, CancellationToken cancellationToken)
    {
        var url = DownloadWindowsEngineCpuUrl;

        if (OperatingSystem.IsLinux())
        {
            if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
            {
                throw new PlatformNotSupportedException("PaddleOCR is not available for Linux ARM64.");
            }

            url = DownloadLinuxEngineCpuUrl;
        }

        await DownloadHelper.DownloadFileAsync(_httpClient, url, destinationFileName, progress, cancellationToken);
    }

    public async Task DownloadEngineGpu(string destinationFileName, IProgress<float>? progress, CancellationToken cancellationToken)
    {
        var url = DownloadWindowsEngineGpuUrl;

        if (OperatingSystem.IsLinux())
        {
            if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
            {
                throw new PlatformNotSupportedException("PaddleOCR is not available for Linux ARM64.");
            }

View on GitHub (pinned to 17a9f07487)

Solutions

  1. Run PaddleOCR on an x86_64 Linux host or on Windows instead.
  2. If ARM64 is required, choose a different OCR engine (e.g. Tesseract) that ships an ARM64 build.
  3. If you control packaging, cross-build a PaddleOCR ARM64 engine and add a LinuxArm64 branch.
  4. Guard the UI so the ARM64 + Linux combination cannot be selected.
Defensive patterns

Strategy: validation

Validate before calling

if (OperatingSystem.IsLinux() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
{
    // disable the CPU engine option in the UI; do not call DownloadEngineCpu
}

Try / catch

try { await service.DownloadEngineCpu(...); }
catch (PlatformNotSupportedException ex) when (ex.Message.Contains("Linux ARM64"))
{ /* tell user PaddleOCR CPU engine is unavailable on this device, suggest Tesseract */ }

Prevention

When it happens

Trigger: OperatingSystem.IsLinux() is true AND RuntimeInformation.ProcessArchitecture == Architecture.Arm64 inside DownloadEngineCpu (the CPU engine selection path).

Common situations: User on a Raspberry Pi 4/5, Ampere Altra, AWS Graviton, or any Linux ARM64 box trying to use PaddleOCR. There is genuinely no upstream engine binary for that target.

Related errors


AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13). Data as JSON: /api/errors/54837734fc12dfa6. Report an issue: GitHub.