plotly/plotly.js · info

addFrames: This API call has yielded too many of these warni

Error message

addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.

What it means

This is the one-time throttle notice for the numeric frame name warning (error 38). Once a single addFrames call has emitted numericNameWarningCountLimit numeric-name collision warnings, Plotly emits this message and suppresses further numeric-name warnings for the remainder of that call. It adds no new failure information beyond indicating many collisions occurred.

Source

Thrown at src/plot_api/plot_api.js:3471

            newName &&
            typeof newName === 'number' &&
            collisionPresent &&
            numericNameWarningCount < numericNameWarningCountLimit
        ) {
            numericNameWarningCount++;

            Lib.warn(
                'addFrames: overwriting frame "' +
                    (_frameHash[name] || _frameHashLocal[name]).name +
                    '" with a frame whose name of type "number" also equates to "' +
                    name +
                    '". This is valid but may potentially lead to unexpected ' +
                    'behavior since all plotly.js frame names are stored internally ' +
                    'as strings.'
            );

            if (numericNameWarningCount === numericNameWarningCountLimit) {
                Lib.warn(
                    'addFrames: This API call has yielded too many of these warnings. ' +
                        'For the rest of this call, further warnings about numeric frame ' +
                        'names will be suppressed.'
                );
            }
        }

        _frameHashLocal[lookupName] = { name: lookupName };

        insertions.push({
            frame: Plots.supplyFrameDefaults(frameList[i]),
            index: indices && indices[i] !== undefined && indices[i] !== null ? indices[i] : bigIndex + i
        });
    }

    // Sort this, taking note that undefined insertions end up at the end:
    insertions.sort(function (a, b) {
        if (a.index > b.index) return -1;

View on GitHub (pinned to 1d090e0b5f)

Solutions

  1. Rename frames with explicit string names (String(i) or a prefix) so the underlying collisions, and thus this notice, disappear.
  2. Deduplicate or reduce colliding frames in the call so the warning limit is never reached.
  3. Treat the message as a signal to fix the naming scheme; further collisions in the same call are silent.

Example fix

// before
Plotly.addFrames(gd, manyFrames.map((f, i) => ({name: i, data: f})));
// after
Plotly.addFrames(gd, manyFrames.map((f, i) => ({name: 'step-' + String(i), data: f})));
Defensive patterns

Strategy: validation

Validate before calling

function countNumericNames(frames) {
  return frames.filter(f => typeof f.name === 'number').length;
}
// usage: if (countNumericNames(frames) > 0) frames = frames.map(normalizeFrameName);

Type guard

function allStringNames(frames) {
  return Array.isArray(frames) && frames.every(f =>
    f != null && typeof f.name === 'string' && f.name.length > 0);
}

Prevention

When it happens

Trigger: A single Plotly.addFrames call producing more than numericNameWarningCountLimit numeric frame name collisions, e.g. bulk-adding many frames named with numbers that string-collide with existing frames.

Common situations: Bulk animation frames generated from data indices with numeric names; repeatedly re-adding the same numeric-named frames within one call.

Related errors


AI-assisted analysis of plotly/plotly.js@1d090e0b5f (2026-09-02). Data as JSON: /api/errors/4054cb015db62441. Report an issue: GitHub.