From bfa582d7fc75dc5f76c59512b7124d40ed9edcf1 Mon Sep 17 00:00:00 2001 From: Ilya Muradyan Date: Sat, 13 Sep 2025 18:21:06 +0200 Subject: [PATCH] Fix NPE in GeoDataFrame rendering --- .../kotlinx/dataframe/jupyter/IntegrationGeo.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dataframe-geo-jupyter/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/IntegrationGeo.kt b/dataframe-geo-jupyter/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/IntegrationGeo.kt index e89425bee6..a2ec36c539 100644 --- a/dataframe-geo-jupyter/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/IntegrationGeo.kt +++ b/dataframe-geo-jupyter/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/IntegrationGeo.kt @@ -15,7 +15,6 @@ import org.jetbrains.kotlinx.jupyter.api.FieldHandler import org.jetbrains.kotlinx.jupyter.api.FieldHandlerExecution import org.jetbrains.kotlinx.jupyter.api.libraries.FieldHandlerFactory import org.jetbrains.kotlinx.jupyter.api.libraries.JupyterIntegration -import org.jetbrains.kotlinx.jupyter.api.outputs.display import kotlin.reflect.KProperty import kotlin.reflect.full.isSubtypeOf import kotlin.reflect.typeOf @@ -55,9 +54,11 @@ internal class IntegrationGeo : JupyterIntegration() { useSchema() } - render> { - notebook.display("GeoDataFrame with ${it.crs?.name?.code} CRS and inner dataframe:") - it.df + renderWithHost> { host, geoDataFrame -> + host.execute { + display("GeoDataFrame with ${geoDataFrame.crs?.name?.code} CRS and inner dataframe:", null) + } + geoDataFrame.df } val replCodeGeneratorImpl = ReplCodeGeneratorImpl()