jackwener/OpenCLI · warning · EmptyResultError
No player match rows matched team ${teamRef.teamId}/${teamRe
Error message
No player match rows matched team ${teamRef.teamId}/${teamRef.slug} What it means
player-vs-team filters the player's match rows by fuzzy team-name match against the parsed team ref. It throws this EmptyResultError when no row's opponent name matches the wanted team slug. The library requires at least one map row against that team to build the summary.
Source
Thrown at clis/hltv/player-vs-team.js:75
{ name: 'period', type: 'string', default: 'all', help: 'all / lastMonth / last3Months / last6Months / last12Months / YYYY / YYYY-MM-DD:YYYY-MM-DD' },
{ name: 'eventType', type: 'string', default: 'all', help: 'all / majors / bigEvents / mvpEvents / lan / online' },
{ name: 'event', type: 'string', default: 'all', help: 'all / event id / /events/:id URL / stats URL with event=' },
{ name: 'ranking', type: 'string', default: 'all', help: 'all / top5 / top10 / top20 / top30 / top50' },
{ name: 'map', type: 'string', default: 'all', help: 'all / ancient / anubis / dust2 / inferno / mirage / nuke / overpass / cache / cobblestone / season / train / tuscan / vertigo' },
{ name: 'version', type: 'string', default: 'both', help: 'both / cs2 / csgo' },
{ name: 'offset', type: 'int', default: 0, help: 'Pagination offset; must be a multiple of 100' },
{ name: 'limit', type: 'int', default: 100, help: 'Rows to scan from the current page (max 100)' },
],
columns: ['rowType', 'rank', 'date', 'playerId', 'opponent', 'map', 'kills', 'deaths', 'rating', 'result', 'matchStatsId', 'details'],
func: async (page, args) => {
const limit = normalizeLimit(args.limit, 100, 100);
const teamRef = parseTeamRef(args.team);
const wanted = norm(teamRef.slug);
const rows = (await readPlayerMatches(page, args, limit)).filter((row) => {
return norm(row.opponent).includes(wanted) || wanted.includes(norm(row.opponent));
});
if (rows.length === 0) {
throw new EmptyResultError('hltv player-vs-team', `No player match rows matched team ${teamRef.teamId}/${teamRef.slug}`);
}
return [
summarize(rows, teamRef),
...rows.map((row) => ({
rowType: 'map',
rank: row.rank,
date: row.date,
playerId: row.playerId,
opponent: row.opponent,
map: row.map,
kills: row.kills,
deaths: row.deaths,
rating: row.rating,
result: row.details?.result ?? null,
matchStatsId: row.matchStatsId,
details: row.details,
})),
];View on GitHub (pinned to 49907e53dc)
Solutions
- Increase the limit to cover more of the player's match history
- Check the team slug matches HLTV's current name for the team (renames break matching)
- Verify the player has actually played against this team recently
- Catch EmptyResultError and treat 'never faced this team' as a valid result
Example fix
// before
const rows = await playerVsTeam(page, { player, team: 'old-team-name', limit: 10 });
// after
const rows = await playerVsTeam(page, { player, team: 'new-team-name', limit: 100 }); // updated slug + bigger window Defensive patterns
Strategy: validation
Validate before calling
// normalize the team slug the same way the library does before calling
const slug = teamRef.split('/').pop().toLowerCase();
if (!slug) throw new Error('team ref must include a slug'); Type guard
function isTeamRef(ref) { return typeof ref === 'string' && /^\d+\/[\w-]+$/.test(ref); } Try / catch
try {
const out = await playerVsTeam(page, args);
} catch (err) {
if (err instanceof EmptyResultError) return { matches: [], note: 'player never faced this team in window' };
throw err;
} Prevention
- Use HLTV's current team slug — renames break name matching
- Increase the history limit to reach older meetings
- Sanity-check the player has played the team before deep-diving
- Remember matching is fuzzy substring-based; exotic names may not match
When it happens
Trigger: Calling with a team the player never faced in the analyzed window; slug normalization mismatch (team renamed, slug differs from opponent string in rows); limit too small to reach any meeting; wrong teamId/slug in the team ref.
Common situations: Querying an old team name after rebrand (slug no longer matches opponent text); player transferred so recent rows have no games vs that team; typos in the team slug argument.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- No last encounter found for ${playerA.playerId} and ${player
- The selected players were not both present in the resolved m
- No shared map rows found for ${playerA.playerId} and ${playe
- No map-pool rows found for team ${teamId}/${slug}
- hltv match-map parser found no player rows
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/7699dec062543482.
Report an issue: GitHub.