Skip to content

Adding rows to data_editor and then clicking "show/hide columns" and then selecting "(index)" causes "This error should never happen. Please report this bug. No cell found for an added row: col=0; row=0" #13915

@davidtsmithoptimax

Description

@davidtsmithoptimax

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

Adding rows to data_editor and then clicking "show/hide columns" and then selecting "(index)" causes "This error should never happen. Please report this bug. No cell found for an added row: col=0; row=0"

Reproducible Code Example

import streamlit as st
import pandas as pd

df = pd.DataFrame(columns=['foo1', 'foo2', 'foo3'])
edited_Foobar = st.data_editor(
    df,
    num_rows='dynamic'
)

Steps To Reproduce

  1. run the app.
  2. add one or more rows to the table by clicking the "+" sign in any cell
  3. click the show/hide columns eyeball above the top right corner of the table
  4. select "(Index)"

Expected Behavior

A new column appears with the header "Index", the cells of which have the correctly assigned indices as represented in the dataframe returned by the data_editor widget.

Current Behavior

A new column appears with a blank header and the contents of the cells of which read "Error during cell creation" with the tooltip "This error should never happen. Please report this bug. No cell found for an added row: col=0; row=0"

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.53.1
  • Python version: 3.14.2
  • Operating System: Windows 11 Pro 24H2
  • Browser: Chrome

Additional Information

Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:st.data_editorRelated to the `st.data_editor` widgetpriority:P3Medium prioritystatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions