From db6eb9fde0174a56f450163ea856011013338837 Mon Sep 17 00:00:00 2001 From: DC Date: Fri, 14 Jun 2024 15:52:41 +0800 Subject: [PATCH] MarshallComponentsException Fix Fixed "module 'streamlit.components.v1' has no attribute 'components'" by changing "components" to "custom_components". --- st_aggrid/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/st_aggrid/__init__.py b/st_aggrid/__init__.py index acb4b52..a0ef021 100644 --- a/st_aggrid/__init__.py +++ b/st_aggrid/__init__.py @@ -345,11 +345,11 @@ def AgGrid( key=key ) - except components.components.MarshallComponentException as ex: + except components.custom_component.MarshallComponentException as ex: #uses a more complete error message. args = list(ex.args) args[0] += ". If you're using custom JsCode objects on gridOptions, ensure that allow_unsafe_jscode is True." - ex = components.components.MarshallComponentException(*args) + ex = components.custom_component.MarshallComponentException(*args) raise(ex) if component_value: