jackwener/OpenCLI · error · ArgumentError
openreview ${label} "${value}" is not a valid profile id (ex
Error message
openreview ${label} "${value}" is not a valid profile id (expected "~First_Last1" or similar; find it on the author's openreview.net profile URL) What it means
requireProfileId throws ArgumentError when the value is non-empty but fails PROFILE_ID_PATTERN: must start with '~', contain at least one Unicode letter, consist of letters/marks/digits/._-, and end with a digit. This prevents querying the API with usernames, emails, or display names.
Source
Thrown at clis/openreview/utils.js:67
if (!id) {
throw new ArgumentError(`openreview ${label} is required`);
}
if (!ID_PATTERN.test(id)) {
throw new ArgumentError(`openreview ${label} "${value}" is not a valid forum id (expected 6-20 chars of [A-Za-z0-9_-])`);
}
return id;
}
/** OpenReview profile ids are `~...N` slugs and may include dots, hyphens, and Unicode letters. */
const PROFILE_ID_PATTERN = /^~(?=.*\p{L})[\p{L}\p{M}0-9._-]+\d+$/u;
export function requireProfileId(value, label = 'profile') {
const id = String(value ?? '').trim();
if (!id) {
throw new ArgumentError(`openreview ${label} is required`);
}
if (!PROFILE_ID_PATTERN.test(id)) {
throw new ArgumentError(`openreview ${label} "${value}" is not a valid profile id (expected "~First_Last1" or similar; find it on the author's openreview.net profile URL)`);
}
return id;
}
/** Wrap fetch + json with typed errors so failures never look like empty results. */
export async function openreviewFetch(path, label) {
const url = `${OPENREVIEW_API}${path}`;
let resp;
try {
resp = await fetch(url);
}
catch (e) {
throw new CommandExecutionError(`Network failure fetching ${label}: ${e?.message ?? e}`, 'Check your network connection and try again.');
}
if (resp.status === 404) {
return null;
}
if (!resp.ok) {View on GitHub (pinned to 49907e53dc)
Solutions
- Use the exact '~First_Last1' id from the author's openreview.net profile URL.
- If unsure of the number suffix, search the author on openreview.net and copy the id.
- Strip any URL prefix so only the '~...' segment remains.
Example fix
// before cli profile 'jane@univ.edu' // after cli profile '~Jane_Doe1'
Defensive patterns
Strategy: validation
Validate before calling
const PROFILE_RE = /^~(?=.*\p{L})[\p{L}\p{M}0-9._-]+\d+$/u;
if (!PROFILE_RE.test(args.profile)) { console.error(`invalid profile id: ${args.profile}`); process.exit(2); } Type guard
const isValidProfileId = (v) => typeof v === 'string' && /^~(?=.*\p{L})[\p{L}\p{M}0-9._-]+\d+$/u.test(v.trim()); Try / catch
try { const pid = requireProfileId(args.profile); } catch (e) { if (e instanceof ArgumentError) { console.error(e.message); process.exit(2); } throw e; } Prevention
- Copy the id directly from the author's openreview.net profile URL.
- Ensure the id starts with '~' and ends with a digit.
- Do not substitute emails or display names for the profile id.
When it happens
Trigger: Passing 'Jane Doe', 'jane@univ.edu', '~JaneDoe' (no trailing digit), 'Jane_Doe1' (missing '~'), or a value with '/' or ':' to profile(args).
Common situations: Using the display name or email instead of the OpenReview slug; dropping the trailing number from the profile id; pasting the profile URL instead of the '~...' id; older format ids that no longer match.
Related errors
- openreview ${label} "${value}" is not a valid forum id (expe
- archive search sort must be one of ${SORT_OPTIONS.join(', ')
- archive search mediatype must be one of ${MEDIATYPES.join(',
- archive search limit must be a positive integer
- archive search limit must be <= 100
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/fa17b70240aeaa25.
Report an issue: GitHub.