Community Cloud : 'streamlit' has no attribute 'data_editor'

Hi all,

I’m currently experiencing issues with the st.data_editor function. I’m currently receiving an error for streamlit’ has no attribute ‘data_editor’. This has been working prior to this week the app is deployed on community cloud. Is anyone else currently experiencing this the example code for st.data_editor is also not working.

import streamlit as st
import pandas as pd

import numpy as np

st.data_editor(np.array([
	["st.text_area", "widget", 4.92],
	["st.markdown", "element", 47.22]
]))

Full text of the error message.
AttributeError: module ‘streamlit’ has no attribute ‘data_editor’

2024-06-17 10:00:14.893 503 GET /script-health-check (127.0.0.1) 289.26ms

────────────────────── Traceback (most recent call last) ───────────────────────

/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py:565 in _run_script

/mount/src/max_cost_per_lead_addpeople/pages/dev_issue_testing.py:11 in

 8 │      {"command": "st.time_input", "rating": 3, "is_widget": True},     

 9    ]                                                                     

10 )                                                                        

❱ 11 edited_df = st.data_editor(df)

12                                                                          

13 favorite_command = edited_df.loc[edited_df["rating"].idxmax()]["command  

14 st.markdown(f"Your favorite command is **{favorite_command}** 🎈") 

Any help would be massively appreciated

My best guess is that you’re using an older version of streamlit that doesn’t have st.data_editor.

To check, you can do st.write(st.__version__) in your app

To fix it, you can put streamlit>=1.23.0 in your requirements.txt, or whatever you are using to manage your dependencies for your app.

I got the same error in my App today and it has been working prior to this week. I guess that data_editor has been depressed by streamlit.

No, st.data_editor is definitely still working in the latest versions of streamlit – what happens when you write out st.version like I suggested above?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.