Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'ExcelBlob' #233

Open
sfc-gh-pkommini opened this issue Aug 18, 2023 · 0 comments
Open

KeyError: 'ExcelBlob' #233

sfc-gh-pkommini opened this issue Aug 18, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@sfc-gh-pkommini
Copy link
Contributor

sfc-gh-pkommini commented Aug 18, 2023

This is the code

def draw_table() -> None:
    df = st.session_state.df
    df_filtered = prepare_data_for_table(df)

    options = GridOptionsBuilder.from_dataframe(
        df_filtered,
        enableRowGroup=True,
        enableValue=True,
        enablePivot=True,
    )
    options.configure_pagination(
        paginationAutoPageSize=False,
        paginationPageSize=50,
    )
    options.configure_grid_options(sideBar={"toolPanels": ['filters']})

    if not len(st.session_state.pre_selected_rows):
        options.configure_selection(
            selection_mode='multiple',
            use_checkbox=True,
            header_checkbox=True,
        )
    else:
        options.configure_selection(
            selection_mode='multiple',
            use_checkbox=True,
            header_checkbox=True,
            pre_selected_rows=st.session_state.pre_selected_rows,
        )

    grid_return = AgGrid(
        df_filtered,
        columns_auto_size_mode=ColumnsAutoSizeMode.FIT_ALL_COLUMNS_TO_VIEW,
        data_return_mode=DataReturnMode.FILTERED,
        gridOptions=options.build(),
        theme=AgGridTheme.ALPINE,
        key='review_data',
    )
    st.session_state.pre_selected_rows = grid_return['selected_rows']

Got the following error

  File "/opt/homebrew/Caskroom/miniconda/base/envs/snowpark/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
    exec(code, module.__dict__)
  File "/Users/<redacted>/sfc-workspace/streamlit-uar/uar/<my_app>.py", line 23, in <module>
    draw_table()
  File "/Users/<redacted>/sfc-workspace/streamlit-uar/uar/utils/ui.py", line 61, in draw_table
    grid_return = AgGrid(
  File "/opt/homebrew/Caskroom/miniconda/base/envs/snowpark/lib/python3.10/site-packages/st_aggrid/__init__.py", line 436, in AgGrid
    response.excel_blob = component_value['ExcelBlob']
KeyError: 'ExcelBlob'
@sfc-gh-pkommini sfc-gh-pkommini changed the title ExcelBlod ExcelBlob Aug 18, 2023
@sfc-gh-pkommini sfc-gh-pkommini changed the title ExcelBlob KeyError: 'ExcelBlob' Aug 18, 2023
@PablocFonseca PablocFonseca added the bug Something isn't working label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants