iOfficeAI/OfficeCLI · error · CliException

dump_reader_not_found

dump_reader_not_found

Error message

No dump-reader plugin found for {sourceExt}.

What it means

CliException (code 'dump_reader_not_found') thrown when PluginRegistry.FindFor returns null for a DumpReader-kind plugin matching the source file's extension. Dump readers convert legacy/binary formats (e.g. .doc, .xls) into a JSONL batch replayed into a fresh native file.

Source

Thrown at src/officecli/Core/Plugins/DumpReaderInvoker.cs:38

///
/// The conversion is one-shot: edits to the returned file are not propagated
/// back to the source file.
/// </summary>
public static class DumpReaderInvoker
{
    public sealed record DumpResult(string ConvertedPath, ResolvedPlugin Plugin);

    /// <summary>
    /// Resolve a dump-reader plugin for <paramref name="sourceExt"/>, invoke it
    /// against <paramref name="sourceFullPath"/>, and replay the resulting
    /// JSONL stream into a fresh native file. Throws CliException on
    /// resolution or invocation failure; otherwise the result references a
    /// temp file the caller must dispose (or leave for OS tmp cleanup).
    /// </summary>
    public static DumpResult Run(string sourceFullPath, string sourceExt)
    {
        var plugin = PluginRegistry.FindFor(PluginKind.DumpReader, sourceExt)
            ?? throw new CliException($"No dump-reader plugin found for {sourceExt}.")
            {
                Code = "dump_reader_not_found",
                Suggestion = "Install a dump-reader plugin (`officecli plugins list` to see installed; plugins/plugin-protocol.md for paths).",
            };

        var targetExt = plugin.Manifest.ResolveTargetExtension();
        var tmpOut = Path.Combine(Path.GetTempPath(),
            $"officecli-dumpread-{Guid.NewGuid():N}{targetExt}");
        // minimal: true gives a bare-skeleton native file (no default styles,
        // theme, or docDefaults for docx; equivalent skeleton for xlsx/pptx).
        // The plugin's batch is expected to define everything it references —
        // round-trip dumps from `officecli dump` do exactly that.
        BlankDocCreator.Create(tmpOut, locale: null, minimal: true);

        int itemIndex = 0;
        Exception? replayError = null;

        // v6.4: open the handler AFTER the plugin process finishes streaming.

View on GitHub (pinned to 1ced45e900)

Solutions

  1. Run `officecli plugins list` to confirm whether a dump-reader for the extension is installed.
  2. Install the missing dump-reader plugin (see plugins/plugin-protocol.md for paths).
  3. Verify the plugin manifest's extensions array includes the source extension and its kind is dump_reader.

Example fix

// before: convert a .doc with no dump-reader installed
officecli convert report.doc report.docx

// after: install the dump-reader plugin first
officecli plugins install doc-dumpreader
officecli convert report.doc report.docx
Defensive patterns

Strategy: validation

Validate before calling

var ext = Path.GetExtension(sourcePath).ToLowerInvariant();
var ok = PluginRegistry.ListInstalled(PluginKind.DumpReader)
    .Any(p => p.Manifest.Extensions.Contains(ext));
if (!ok) throw new InvalidOperationException($"No dump-reader for {ext}; install one first.");

Try / catch

try { DumpReaderInvoker.Run(source, ext); }
catch (CliException ex) when (ex.Code == "dump_reader_not_found")
{ /* prompt user to install the plugin, abort gracefully */ }

Prevention

When it happens

Trigger: DumpReaderInvoker.Run is called for a source extension no installed dump-reader plugin declares support for. The suggestion text points users to `officecli plugins list` and plugins/plugin-protocol.md.

Common situations: First run on a machine where the .doc/.xls dump plugin was never installed; plugin manifest's extensions field does not list the source ext; plugin install path broken or uninstalled.

Related errors


AI-assisted analysis of iOfficeAI/OfficeCLI@1ced45e900 (2026-08-13). Data as JSON: /api/errors/12e62ae2291cd537. Report an issue: GitHub.