{"record":{"id":"4054cb015db62441","repo":"plotly/plotly.js","slug":"addframes-this-api-call-has-yielded-too-many-of-t","errorCode":null,"errorMessage":"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.","messagePattern":"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\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/plot_api/plot_api.js","lineNumber":3471,"sourceCode":"            newName &&\n            typeof newName === 'number' &&\n            collisionPresent &&\n            numericNameWarningCount < numericNameWarningCountLimit\n        ) {\n            numericNameWarningCount++;\n\n            Lib.warn(\n                'addFrames: overwriting frame \"' +\n                    (_frameHash[name] || _frameHashLocal[name]).name +\n                    '\" with a frame whose name of type \"number\" also equates to \"' +\n                    name +\n                    '\". This is valid but may potentially lead to unexpected ' +\n                    'behavior since all plotly.js frame names are stored internally ' +\n                    'as strings.'\n            );\n\n            if (numericNameWarningCount === numericNameWarningCountLimit) {\n                Lib.warn(\n                    'addFrames: This API call has yielded too many of these warnings. ' +\n                        'For the rest of this call, further warnings about numeric frame ' +\n                        'names will be suppressed.'\n                );\n            }\n        }\n\n        _frameHashLocal[lookupName] = { name: lookupName };\n\n        insertions.push({\n            frame: Plots.supplyFrameDefaults(frameList[i]),\n            index: indices && indices[i] !== undefined && indices[i] !== null ? indices[i] : bigIndex + i\n        });\n    }\n\n    // Sort this, taking note that undefined insertions end up at the end:\n    insertions.sort(function (a, b) {\n        if (a.index > b.index) return -1;","sourceCodeStart":3453,"sourceCodeEnd":3489,"githubUrl":"https://github.com/plotly/plotly.js/blob/1d090e0b5ffb8d0fdf6e0e4ff51d3f3cf67f1314/src/plot_api/plot_api.js#L3453-L3489","documentation":"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.","triggerScenarios":"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.","commonSituations":"Bulk animation frames generated from data indices with numeric names; repeatedly re-adding the same numeric-named frames within one call.","solutions":["Rename frames with explicit string names (String(i) or a prefix) so the underlying collisions, and thus this notice, disappear.","Deduplicate or reduce colliding frames in the call so the warning limit is never reached.","Treat the message as a signal to fix the naming scheme; further collisions in the same call are silent."],"exampleFix":"// before\nPlotly.addFrames(gd, manyFrames.map((f, i) => ({name: i, data: f})));\n// after\nPlotly.addFrames(gd, manyFrames.map((f, i) => ({name: 'step-' + String(i), data: f})));","handlingStrategy":"validation","validationCode":"function countNumericNames(frames) {\n  return frames.filter(f => typeof f.name === 'number').length;\n}\n// usage: if (countNumericNames(frames) > 0) frames = frames.map(normalizeFrameName);","typeGuard":"function allStringNames(frames) {\n  return Array.isArray(frames) && frames.every(f =>\n    f != null && typeof f.name === 'string' && f.name.length > 0);\n}","tryCatchPattern":null,"preventionTips":["Normalize all frame names to strings before bulk addFrames calls.","Treat this throttle notice as a code smell: many numeric-name collisions exist.","Deduplicate frames within each addFrames call.","Prefer semantic frame names over index-based names."],"tags":["plotly","addframes","warning-throttle","frame-names","type-coercion"],"backgroundTag":"numeric-frame-name-collision","analyzedSha":"1d090e0b5ffb8d0fdf6e0e4ff51d3f3cf67f1314","analyzedAt":"2026-09-02T22:03:39.906Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}