heygen-com/hyperframes · error · CubeLutParseError
Unsupported cube keyword ${keyword}
Error message
Unsupported cube keyword ${keyword} What it means
The parser recognizes only LUT_1D_SIZE, LUT_3D_SIZE, and LUT_3D_INPUT_RANGE among LUT_-prefixed keywords. Any other LUT_-prefixed keyword on a non-numeric line throws at line 152, so unsupported or misspelled extensions fail loudly rather than being silently dropped.
Source
Thrown at packages/core/src/colorLuts.ts:152
domainMin = [min, min, min];
domainMax = [max, max, max];
continue;
}
if (keyword === "LUT_1D_SIZE") {
lut1dSize = parseSize(rest[0], keyword, lineNumber);
continue;
}
if (keyword === "LUT_3D_SIZE") {
lut3dSize = parseSize(rest[0], keyword, lineNumber);
if (lut3dSize > maxSize) {
throw new CubeLutParseError(`LUT_3D_SIZE ${lut3dSize} exceeds max ${maxSize}`, lineNumber);
}
continue;
}
if (!isNumericDataLine(keyword)) {
if (keyword.startsWith("LUT_")) {
throw new CubeLutParseError(`Unsupported cube keyword ${keyword}`, lineNumber);
}
continue;
}
if (!lut3dSize) {
if (lut1dSize) {
throw new CubeLutParseError("1D cube LUTs are not supported yet", lineNumber);
}
throw new CubeLutParseError("LUT data appears before LUT_3D_SIZE", lineNumber);
}
if (parts.length !== 3) {
throw new CubeLutParseError("LUT data rows must contain three numbers", lineNumber);
}
rows.push(
parseFiniteNumber(parts[0]!, lineNumber),
parseFiniteNumber(parts[1]!, lineNumber),
parseFiniteNumber(parts[2]!, lineNumber),
);
}View on GitHub (pinned to c2996c8626)
Solutions
- Strip or comment out (with '#') any LUT_-prefixed lines the parser does not support.
- Fix the typo if the keyword was meant to be LUT_1D_SIZE / LUT_3D_SIZE / LUT_3D_INPUT_RANGE.
- Upgrade the package if a newer version supports the keyword.
Example fix
// before LUT_3D_SISE 32 LUT_VERSION 2 // after LUT_3D_SIZE 32 # LUT_VERSION 2
Defensive patterns
Strategy: try-catch
Validate before calling
const SUPPORTED_LUT_KEYWORDS = new Set(['LUT_1D_SIZE', 'LUT_3D_SIZE', 'LUT_3D_INPUT_RANGE']);
function assertNoUnsupportedLutKeywords(fileText: string): void {
for (const line of fileText.split(/\r?\n/)) {
const kw = (line.trim().split(/\s+/)[0] ?? '').toUpperCase();
if (kw.startsWith('LUT_') && !SUPPORTED_LUT_KEYWORDS.has(kw) && !/^[-+\d.]/.test(kw)) {
throw new Error(`Unsupported cube keyword: ${kw}`);
}
}
} Try / catch
try {
parseCubeLut(fileText);
} catch (err) {
if (err instanceof CubeLutParseError && /Unsupported cube keyword/.test(err.message)) {
// comment out the offending line and retry, or surface to user
} else throw err;
} Prevention
- Comment out (with '#') any LUT_-prefixed lines you do not recognize.
- Re-export from the source tool to drop vendor extensions.
- Upgrade the package when support for the keyword is added.
When it happens
Trigger: A line such as 'LUT_2D_SIZE 8', 'LUT_FOO 1', or a vendor extension like 'LUT_VERSION 2' that is not numeric data.
Common situations: Vendor-extended .cube dialects; a typo such as 'LUT_3D_SISE'; future-format files using keywords this parser version does not know.
Related errors
- Invalid number "${value}"
- ${keyword} expects three numbers
- ${keyword} expects a size
- ${keyword} must be an integer greater than 1
- DOMAIN_MAX values must be greater than DOMAIN_MIN values
AI-assisted analysis of heygen-com/hyperframes@c2996c8626 (2026-08-12).
Data as JSON: /api/errors/1eab0c4a0ca44545.
Report an issue: GitHub.