PablocFonseca / streamlit-aggrid

Implementation of Ag-Grid component for Streamlit
https://pypi.org/project/streamlit-aggrid/
MIT License
1.05k stars 199 forks source link

Can't pickle local object 'GridOptionsBuilder.__init__.<locals>.ddict' #263

Open iivvaanni opened 5 months ago

iivvaanni commented 5 months ago

Hello. I'm using @st.cache_data wrapper in function where I create grid_options object . After version 1.0.0 I've got the errror in title. The code looks like this:

@st.cache_data
def prepare_dataframe_to_view(_df):
  gb = GridOptionsBuilder.from_dataframe(_df)
  #...
  grid_options = gb.build()
  #...
  return grid_options # Here I've got an error
PablocFonseca commented 5 months ago

I'll check it. Probably I'll need to implement getstate and setstate for gridOptions builder