jackwener/OpenCLI · error · CommandExecutionError

No papers found for: ${data.name || author}

Error message

No papers found for: ${data.name || author}

What it means

The profile page loaded and the author name was scraped successfully (`data.name` present), but the publications table (`#gsc_a_b .gsc_a_tr` rows) yielded zero papers. The command requires at least one paper row to produce output, so it throws for authors with empty publication lists or unrendered tables.

Source

Thrown at clis/google-scholar/profile.js:80

                });
            }

            return {
                name: name.trim(),
                affiliation: affiliation.trim(),
                citations: citations,
                hIndex: hIndex,
                i10Index: i10Index,
                papers: papers,
            };
        })()`);

        if (!data?.name) {
            throw new CommandExecutionError(`Could not load Google Scholar profile for: ${author}`);
        }

        if (!data.papers || data.papers.length === 0) {
            throw new CommandExecutionError(`No papers found for: ${data.name || author}`);
        }

        const summary = {
            rank: 0,
            title: data.name + (data.affiliation ? ' (' + data.affiliation + ')' : ''),
            cited: 'h=' + data.hIndex + ' i10=' + data.i10Index + ' total=' + data.citations,
            year: '-',
        };

        return [summary, ...data.papers];
    },
});

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Increase page load time / retry — if the table just hadn't rendered, a re-run usually finds rows.
  2. Verify in a browser whether the author truly has zero publications listed on their Scholar profile.
  3. If the profile is legitimately empty, the error is expected; pick a different author or accept the empty result.
  4. Report the issue if a known non-empty profile consistently fails (possible DOM selector change).

Example fix

// before
opencli run google-scholar profile "JicYPdAAAAAJ" --limit 10  // zero rows scraped
// after
opencli run google-scholar profile "JicYPdAAAAAJ" --limit 10  # retry once after a delay
Defensive patterns

Strategy: try-catch

Try / catch

try {
  const rows = await run('google-scholar profile', author);
} catch (e) {
  if (e instanceof CommandExecutionError && /No papers found/.test(e.message)) {
    return { author, papers: [] }; // treat as legitimately empty
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling `google-scholar profile <author>` for an author whose Scholar profile has no publications, whose papers table is hidden behind 'Show more' lazy loading, or whose table rows failed to render in time before the 3-second `page.wait(3)` elapsed.

Common situations: New/early-career authors with zero listed papers; profiles where all papers were removed; slow page loads on poor network so the papers table hasn't painted; Scholar DOM changes renaming `.gsc_a_tr`.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/51a488b9f67f4020. Report an issue: GitHub.