diff --git a/Notebooks/solara/IRISCC/IRISCC_solara_widget.ipynb b/Notebooks/solara/IRISCC/IRISCC_solara_widget.ipynb index d7fb04c..9c9c17e 100644 --- a/Notebooks/solara/IRISCC/IRISCC_solara_widget.ipynb +++ b/Notebooks/solara/IRISCC/IRISCC_solara_widget.ipynb @@ -1,5 +1,13 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "CHANGE LATER:\n", + "- dir_output (in first cell under 2) User Input" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -11,21 +19,51 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Could not check jupyter-widgets extensions.\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\solara\\checks.py\", line 201, in check_jupyter\n", + " python_executable = server_python or get_server_python_executable(silent)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"c:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\solara\\checks.py\", line 155, in get_server_python_executable\n", + " pythons = [getcmdline(server[\"pid\"]) for server in servers]\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"c:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\solara\\checks.py\", line 135, in getcmdline\n", + " return subprocess.check_output([\"wmic\", \"process\", \"get\", \"commandline\", \"/format:list\"]).split(b\"\\n\")[0].split(b\" \")[0].decode(\"utf-8\")\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"c:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\subprocess.py\", line 466, in check_output\n", + " return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"c:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\subprocess.py\", line 548, in run\n", + " with Popen(*popenargs, **kwargs) as process:\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"c:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\subprocess.py\", line 1026, in __init__\n", + " self._execute_child(args, executable, preexec_fn, close_fds,\n", + " File \"c:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\subprocess.py\", line 1538, in _execute_child\n", + " hp, ht, pid, tid = _winapi.CreateProcess(executable, args,\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "FileNotFoundError: [WinError 2] The system cannot find the file specified\n" + ] + } + ], "source": [ "import os\n", "import matplotlib.pyplot as plt\n", "plt.close('all')\n", "import dfm_tools as dfmt\n", "# import hydrolib.core.dflowfm as hcdfm \n", - "# import xarray as xr\n", + "import xarray as xr\n", "# import pandas as pd\n", "# import numpy as np\n", "# import contextily as ctx\n", "\n", "import solara\n", "import solara.lab\n", - "from ipyleaflet import Map, basemaps, ImageOverlay\n", + "from ipyleaflet import Map, basemaps# , ImageOverlay\n", "import datetime\n", "from pathlib import Path\n", "# import tempfile\n", @@ -97,15 +135,13 @@ "dxy = solara.reactive(\"0.5\")\n", "\n", "lat_min = solara.reactive(0.0); lat_max = solara.reactive(0.0); lon_min = solara.reactive(0.0); lon_max = solara.reactive(0.0)\n", - "# def reset_map(): #########################################################################################################################################################################################################################\n", - "# m.set(Map(center=(lat_min.value+(lat_max.value-lat_min.value)*0.5, lon_min.value+(lon_max.value-lon_min.value)*0.5), \n", - "# zoom=5, scroll_wheel_zoom=True, basemap=basemaps.OpenStreetMap.Mapnik))\n", + "\n", "\n", "date_min = solara.reactive(datetime.date(2022, 11, 1))\n", "date_max = solara.reactive(datetime.date(2022, 11, 3))\n", "ref_date = solara.reactive(datetime.date(2022, 1, 1))\n", "\n", - "dir_output = solara.reactive(\"C:\\\\\") # os.path.abspath(f'./{model_name}_model')\n", + "dir_output = solara.reactive(\"C:\\\\Users\\\\santjer\\\\OneDrive - Stichting Deltares\\\\Documents\\\\IRISCC\")# (\"C:\\\\\") # os.path.abspath(f'./{model_name}_model') \n", "def makedir():\n", " dir_path = Path(dir_output.value) \n", " os.makedirs(dir_path, exist_ok=True)\n", @@ -123,7 +159,7 @@ "source": [ "@solara.component\n", "def Tab_User_Input():\n", - " solara.use_effect(reset_map, dependencies=[lat_min.value, lat_max.value, lon_min.value, lon_max.value])\n", + " solara.use_effect(reset_map, dependencies=[lat_min.value, lat_max.value, lon_min.value, lon_max.value]) # RESET THE MAP --> works, but then grid not visible again\n", " with solara.Card(\"User Input\", style={\"width\": \"100%\", \"padding\": \"10px\"}):\n", " solara.Markdown(\"\"\"**Note to the user**: In this notebook we use publicly available data \n", " from Copernicus Programme of the European Union. To access this data you \n", @@ -198,10 +234,11 @@ "metadata": {}, "outputs": [], "source": [ - "\n", - "\n", - "grid_status = solara.reactive(\"Idle\") \n", + "# Grid Generation -------------------------------------------------------------------------------------------------------------------------------------------\n", + "grid_status = solara.reactive(\"Idle\")\n", + "grid_visible = solara.reactive(False) \n", "def generate_grid():\n", + " global mk_object\n", " grid_status.set(\"Generating\")\n", " # generate spherical regular grid\n", " mk_object = dfmt.make_basegrid(lon_min.value, lon_max.value, lat_min.value, lat_max.value, dx=float(dxy.value), dy=float(dxy.value), crs=crs)\n", @@ -222,7 +259,76 @@ " # return grid_layer, bnd_layer\n", " m.value.add_layer(grid_layer)\n", " m.value.add_layer(bnd_layer)\n", - " \n" + " grid_visible.set(True)\n", + " # generate plifile\n", + " pli_polyfile = dfmt.geodataframe_to_PolyFile(bnd_gdf_interp, name=f'{model_name.value}_bnd')\n", + " poly_file = os.path.join(dir_output.value, f'{model_name.value}.pli')\n", + " pli_polyfile.save(poly_file)\n", + "\n", + "\n", + "# Grid refinement -------------------------------------------------------------------------------------------------------------------------------------------\n", + "grid_refinement_options = [\"300\", \"3000\"]\n", + "min_edge_size = solara.reactive(\"3000\")\n", + "\n", + "# Bathymetry options -----------------------------------------------------------------------------------------------------------------------------------------\n", + "bathymetry_options = [\"Deltares\", \"NOAA\", \"Own data (not implemented)\"]\n", + "bathy_choice = solara.reactive(\"Deltares\")\n", + "\n", + "# Refine Grid ------------------------------------------------------------------------------------------------------------------------------------------------\n", + "continuous_update_grid = solara.reactive(True)\n", + "gridref_status = solara.reactive(\"Idle\")\n", + "def refine_grid():\n", + " global grid_layer\n", + " gridref_status.set(\"Generating\")\n", + " if bathy_choice.value == \"Deltares\":\n", + " file_nc_bathy = \"https://opendap.deltares.nl/thredds/dodsC/opendap/deltares/Delft3D/netcdf_example_files/GEBCO_2022/GEBCO_2022_coarsefac08.nc\"\n", + " data_bathy = xr.open_dataset(file_nc_bathy).elevation\n", + " elif bathy_choice.value == \"NOAA\":\n", + " file_nc_bathy = \"https://www.ngdc.noaa.gov/thredds/dodsC/global/ETOPO2022/30s/30s_surface_elev_netcdf/ETOPO_2022_v1_30s_N90W180_surface.nc\"\n", + " data_bathy = xr.open_dataset(file_nc_bathy).z\n", + " # else: # NOT IMPLEMENTED\n", + "\n", + " # subset to area of interest\n", + " data_bathy_sel = data_bathy.sel(lon=slice(lon_min.value-1, lon_max.value+1), lat=slice(lat_min.value-1, lat_max.value+1))\n", + " dfmt.refine_basegrid(mk=mk_object, data_bathy_sel=data_bathy_sel, min_edge_size=min_edge_size.value)\n", + "\n", + " # PLOT PLOT PLOT PLOT PLOT PLOT PLOT PLOT PLOT PLOT\n", + " # transform grid data\n", + " mesh = mk_object.mesh2d_get(); node_x = mesh.node_x; node_y = mesh.node_y; edge_nodes = mesh.edge_nodes \n", + " line_geometries = [LineString([(node_x[start], node_y[start]), (node_x[end], node_y[end])]) for start, end in zip(edge_nodes[::2], edge_nodes[1::2])]\n", + " gdf = gpd.GeoDataFrame(geometry=line_geometries, crs=\"EPSG:4326\")\n", + " # add grid to map\n", + " gdf_json = gdf.to_json()\n", + " grid_layer = GeoJSON(data=json.loads(gdf_json),style={\"color\": \"blue\", \"weight\": 2},name=\"Grid Lines\")\n", + " gridref_status.set(\"Completed\")\n", + " # return grid_layer, bnd_layer\n", + " m.value.add_layer(grid_layer)\n", + " grid_visible.set(True)\n", + "\n", + "\n", + "# Remove Land ---------------------------------------------------------------------------------------------------------------------------------------------\n", + "continuous_update_land = solara.reactive(True)\n", + "remland_status = solara.reactive(\"Idle\")\n", + "def remove_land():\n", + " remland_status.set(\"Removing\")\n", + " # remove land with GSHHS coastlines\n", + " dfmt.meshkernel_delete_withcoastlines(mk=mk_object, res='h')\n", + " # derive illegalcells geodataframe\n", + " illegalcells_gdf = dfmt.meshkernel_get_illegalcells(mk=mk_object)\n", + "\n", + " # PLOT PLOT PLOT PLOT PLOT PLOT PLOT PLOT PLOT PLOT\n", + " # transform grid data\n", + " mesh = mk_object.mesh2d_get(); node_x = mesh.node_x; node_y = mesh.node_y; edge_nodes = mesh.edge_nodes \n", + " line_geometries = [LineString([(node_x[start], node_y[start]), (node_x[end], node_y[end])]) for start, end in zip(edge_nodes[::2], edge_nodes[1::2])]\n", + " gdf = gpd.GeoDataFrame(geometry=line_geometries, crs=\"EPSG:4326\")\n", + " # add grid to map\n", + " gdf_json = gdf.to_json()\n", + " grid_wolandcells_layer = GeoJSON(data=json.loads(gdf_json),style={\"color\": \"blue\", \"weight\": 2},name=\"Grid Lines\")\n", + " remland_status.set(\"Completed\")\n", + " # return grid_layer, bnd_layer\n", + " m.value.remove_layer(grid_layer)\n", + " m.value.add_layer(grid_wolandcells_layer)\n", + " grid_visible.set(True)\n" ] }, { @@ -231,15 +337,37 @@ "metadata": {}, "outputs": [], "source": [ + "\n", + "\n", "@solara.component\n", "def Tab_Grid():\n", - " \n", " with solara.Card(\"Grid Generation\", style={\"width\": \"100%\", \"padding\": \"10px\"}):\n", - " solara.Button(label=\"Generate Grid\",on_click=generate_grid, continuous_update=True)\n", + " solara.Button(label=\"Generate Grid\",on_click=generate_grid, continuous_update=True) # continuous_update_grid=True)\n", " if grid_status.value == \"Generating\":\n", " solara.Markdown(\"**Generating grid...** Please wait.\")\n", " elif grid_status.value == \"Completed\":\n", " solara.Markdown(\"**Grid generation completed successfully!**\")\n", + " \n", + " solara.Markdown(\"**Grid Refinement:**\")\n", + " solara.Select(label=\"Grid Refinement\", value=min_edge_size, values=grid_refinement_options)\n", + " solara.Markdown(\"**Bathymetry:**\")\n", + " solara.Select(label=\"Bathymetry\", value=bathy_choice, values=bathymetry_options)\n", + " solara.Markdown(\"\"\"**Note, if 'Own data' is chosen**: You can download your own full \n", + " resolution cutout from [gebco data]( https://download.gebco.net) \n", + " (use a buffer of e.g. 1 degree).\"\"\")\n", + " \n", + " solara.Button(label=\"Refine Grid\",on_click=refine_grid, continuous_update=True) # continuous_update_grid=True)\n", + " if gridref_status.value == \"Refining\":\n", + " solara.Markdown(\"**Refining grid...** Please wait.\")\n", + " elif gridref_status.value == \"Completed\":\n", + " solara.Markdown(\"**Grid refinement completed successfully!**\") \n", + "\n", + " solara.Button(label=\"Remove Land\",on_click=remove_land, continuous_update=True) # continuous_update_land=True)\n", + " if remland_status.value == \"Removing\":\n", + " solara.Markdown(\"**Removing land cells...** Please wait.\")\n", + " elif remland_status.value == \"Completed\":\n", + " solara.Markdown(\"**Land cells removed successfully!**\") \n", + " \n", "\n", "# Tab_Grid()" ] @@ -248,7 +376,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Grid successful overlay m:" + "# Grid modification try and overlay m:" ] }, { @@ -264,9 +392,18 @@ "crs = 'EPSG:4326' # coordinate reference system\n", "model_name = solara.reactive(\"Model Name\")\n", "\n", + "min_edge_size = solara.reactive(\"3000\")\n", + "\n", "m = solara.reactive(Map(center=(55.5, 3), zoom=2, scroll_wheel_zoom=True,basemap=basemaps.OpenStreetMap.Mapnik)) " ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## generate and plot grid" + ] + }, { "cell_type": "code", "execution_count": null, @@ -302,6 +439,112 @@ "display(m.value)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Refine grid" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "m.value.remove_layer(grid_layer)\n", + "m.value.remove_layer(bnd_layer)\n", + "\n", + "file_nc_bathy = \"https://opendap.deltares.nl/thredds/dodsC/opendap/deltares/Delft3D/netcdf_example_files/GEBCO_2022/GEBCO_2022_coarsefac08.nc\"\n", + "data_bathy = xr.open_dataset(file_nc_bathy).elevation\n", + "\n", + "\n", + "# subset to area of interest\n", + "data_bathy_sel = data_bathy.sel(lon=slice(lon_min.value-1, lon_max.value+1), lat=slice(lat_min.value-1, lat_max.value+1))\n", + "dfmt.refine_basegrid(mk=mk_object, data_bathy_sel=data_bathy_sel, min_edge_size=min_edge_size.value)\n", + "\n", + "# PLOT PLOT PLOT PLOT PLOT PLOT PLOT PLOT PLOT PLOT\n", + "# transform grid data\n", + "mesh = mk_object.mesh2d_get(); node_x = mesh.node_x; node_y = mesh.node_y; edge_nodes = mesh.edge_nodes \n", + "line_geometries = [LineString([(node_x[start], node_y[start]), (node_x[end], node_y[end])]) for start, end in zip(edge_nodes[::2], edge_nodes[1::2])]\n", + "gdf = gpd.GeoDataFrame(geometry=line_geometries, crs=\"EPSG:4326\")\n", + "# add grid to map\n", + "gdf_json = gdf.to_json()\n", + "grid_refine_layer = GeoJSON(data=json.loads(gdf_json),style={\"color\": \"blue\", \"weight\": 2},name=\"Grid Lines\")\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "m.value.add_layer(grid_refine_layer)\n", + "display(m.value)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Cut landcells" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "m.value.remove_layer(grid_refine_layer)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "dfmt.meshkernel_delete_withcoastlines(mk=mk_object, res='h')\n", + "illegalcells_gdf = dfmt.meshkernel_get_illegalcells(mk=mk_object)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "# PLOT PLOT PLOT PLOT PLOT PLOT PLOT PLOT PLOT PLOT\n", + "# transform grid data\n", + "mesh = mk_object.mesh2d_get(); node_x = mesh.node_x; node_y = mesh.node_y; edge_nodes = mesh.edge_nodes \n", + "line_geometries = [LineString([(node_x[start], node_y[start]), (node_x[end], node_y[end])]) for start, end in zip(edge_nodes[::2], edge_nodes[1::2])]\n", + "gdf = gpd.GeoDataFrame(geometry=line_geometries, crs=\"EPSG:4326\")\n", + "# add grid to map\n", + "gdf_json = gdf.to_json()\n", + "grid_wolandcells_layer = GeoJSON(data=json.loads(gdf_json),style={\"color\": \"blue\", \"weight\": 2},name=\"Grid Lines\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "m.value.add_layer(grid_wolandcells_layer)\n", + "display(m.value)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "help(m.value)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -318,13 +561,13 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "ef4a40aaa9ba48dea2f91c255b0e00cb", + "model_id": "70ea24b0ddae4e9eba9a25f06125bbd5", "version_major": 2, "version_minor": 0 }, @@ -337,6 +580,117 @@ }, "metadata": {}, "output_type": "display_data" + }, + { + "ename": "TraitError", + "evalue": "The 'east' trait of a Map instance expected a float, not the NoneType None.", + "output_type": "error", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[1;31mTraitError\u001b[0m Traceback (most recent call last)", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\ipywidgets\\widgets\\widget.py:773\u001b[0m, in \u001b[0;36mWidget._handle_msg\u001b[1;34m(self, msg)\u001b[0m\n\u001b[0;32m 771\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffer_paths\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;129;01min\u001b[39;00m data:\n\u001b[0;32m 772\u001b[0m _put_buffers(state, data[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffer_paths\u001b[39m\u001b[38;5;124m'\u001b[39m], msg[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffers\u001b[39m\u001b[38;5;124m'\u001b[39m])\n\u001b[1;32m--> 773\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43mstate\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 775\u001b[0m \u001b[38;5;66;03m# Handle a state request.\u001b[39;00m\n\u001b[0;32m 776\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m method \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mrequest_state\u001b[39m\u001b[38;5;124m'\u001b[39m:\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\ipywidgets\\widgets\\widget.py:655\u001b[0m, in \u001b[0;36mWidget.set_state\u001b[1;34m(self, sync_data)\u001b[0m\n\u001b[0;32m 652\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m name \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mkeys:\n\u001b[0;32m 653\u001b[0m from_json \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtrait_metadata(name, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mfrom_json\u001b[39m\u001b[38;5;124m'\u001b[39m,\n\u001b[0;32m 654\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_trait_from_json)\n\u001b[1;32m--> 655\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset_trait\u001b[49m\u001b[43m(\u001b[49m\u001b[43mname\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfrom_json\u001b[49m\u001b[43m(\u001b[49m\u001b[43msync_data\u001b[49m\u001b[43m[\u001b[49m\u001b[43mname\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:1764\u001b[0m, in \u001b[0;36mHasTraits.set_trait\u001b[1;34m(self, name, value)\u001b[0m\n\u001b[0;32m 1762\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhas_trait(name):\n\u001b[0;32m 1763\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m TraitError(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mClass \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m does not have a trait named \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mname\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m-> 1764\u001b[0m \u001b[38;5;28;43mgetattr\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mcls\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mname\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:690\u001b[0m, in \u001b[0;36mTraitType.set\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 689\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21mset\u001b[39m(\u001b[38;5;28mself\u001b[39m, obj: HasTraits, value: S) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m--> 690\u001b[0m new_value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_validate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 691\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 692\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:722\u001b[0m, in \u001b[0;36mTraitType._validate\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 720\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m value\n\u001b[0;32m 721\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mvalidate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m--> 722\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvalidate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 723\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m obj\u001b[38;5;241m.\u001b[39m_cross_validation_lock \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mFalse\u001b[39;00m:\n\u001b[0;32m 724\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_cross_validate(obj, value)\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:2755\u001b[0m, in \u001b[0;36mFloat.validate\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 2753\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mfloat\u001b[39m(value)\n\u001b[0;32m 2754\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(value, \u001b[38;5;28mfloat\u001b[39m):\n\u001b[1;32m-> 2755\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43merror\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 2756\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m t\u001b[38;5;241m.\u001b[39mcast(G, _validate_bounds(\u001b[38;5;28mself\u001b[39m, obj, value))\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:831\u001b[0m, in \u001b[0;36mTraitType.error\u001b[1;34m(self, obj, value, error, info)\u001b[0m\n\u001b[0;32m 825\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 826\u001b[0m e \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mThe \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m trait expected \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m, not \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mformat(\n\u001b[0;32m 827\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname,\n\u001b[0;32m 828\u001b[0m info \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minfo(),\n\u001b[0;32m 829\u001b[0m describe(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mthe\u001b[39m\u001b[38;5;124m\"\u001b[39m, value),\n\u001b[0;32m 830\u001b[0m )\n\u001b[1;32m--> 831\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m TraitError(e)\n", + "\u001b[1;31mTraitError\u001b[0m: The 'east' trait of a Map instance expected a float, not the NoneType None." + ] + }, + { + "ename": "TraitError", + "evalue": "The 'east' trait of a Map instance expected a float, not the NoneType None.", + "output_type": "error", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[1;31mTraitError\u001b[0m Traceback (most recent call last)", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\ipywidgets\\widgets\\widget.py:773\u001b[0m, in \u001b[0;36mWidget._handle_msg\u001b[1;34m(self, msg)\u001b[0m\n\u001b[0;32m 771\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffer_paths\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;129;01min\u001b[39;00m data:\n\u001b[0;32m 772\u001b[0m _put_buffers(state, data[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffer_paths\u001b[39m\u001b[38;5;124m'\u001b[39m], msg[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffers\u001b[39m\u001b[38;5;124m'\u001b[39m])\n\u001b[1;32m--> 773\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43mstate\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 775\u001b[0m \u001b[38;5;66;03m# Handle a state request.\u001b[39;00m\n\u001b[0;32m 776\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m method \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mrequest_state\u001b[39m\u001b[38;5;124m'\u001b[39m:\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\ipywidgets\\widgets\\widget.py:655\u001b[0m, in \u001b[0;36mWidget.set_state\u001b[1;34m(self, sync_data)\u001b[0m\n\u001b[0;32m 652\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m name \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mkeys:\n\u001b[0;32m 653\u001b[0m from_json \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtrait_metadata(name, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mfrom_json\u001b[39m\u001b[38;5;124m'\u001b[39m,\n\u001b[0;32m 654\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_trait_from_json)\n\u001b[1;32m--> 655\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset_trait\u001b[49m\u001b[43m(\u001b[49m\u001b[43mname\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfrom_json\u001b[49m\u001b[43m(\u001b[49m\u001b[43msync_data\u001b[49m\u001b[43m[\u001b[49m\u001b[43mname\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:1764\u001b[0m, in \u001b[0;36mHasTraits.set_trait\u001b[1;34m(self, name, value)\u001b[0m\n\u001b[0;32m 1762\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhas_trait(name):\n\u001b[0;32m 1763\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m TraitError(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mClass \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m does not have a trait named \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mname\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m-> 1764\u001b[0m \u001b[38;5;28;43mgetattr\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mcls\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mname\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:690\u001b[0m, in \u001b[0;36mTraitType.set\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 689\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21mset\u001b[39m(\u001b[38;5;28mself\u001b[39m, obj: HasTraits, value: S) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m--> 690\u001b[0m new_value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_validate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 691\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 692\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:722\u001b[0m, in \u001b[0;36mTraitType._validate\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 720\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m value\n\u001b[0;32m 721\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mvalidate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m--> 722\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvalidate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 723\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m obj\u001b[38;5;241m.\u001b[39m_cross_validation_lock \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mFalse\u001b[39;00m:\n\u001b[0;32m 724\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_cross_validate(obj, value)\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:2755\u001b[0m, in \u001b[0;36mFloat.validate\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 2753\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mfloat\u001b[39m(value)\n\u001b[0;32m 2754\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(value, \u001b[38;5;28mfloat\u001b[39m):\n\u001b[1;32m-> 2755\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43merror\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 2756\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m t\u001b[38;5;241m.\u001b[39mcast(G, _validate_bounds(\u001b[38;5;28mself\u001b[39m, obj, value))\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:831\u001b[0m, in \u001b[0;36mTraitType.error\u001b[1;34m(self, obj, value, error, info)\u001b[0m\n\u001b[0;32m 825\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 826\u001b[0m e \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mThe \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m trait expected \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m, not \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mformat(\n\u001b[0;32m 827\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname,\n\u001b[0;32m 828\u001b[0m info \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minfo(),\n\u001b[0;32m 829\u001b[0m describe(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mthe\u001b[39m\u001b[38;5;124m\"\u001b[39m, value),\n\u001b[0;32m 830\u001b[0m )\n\u001b[1;32m--> 831\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m TraitError(e)\n", + "\u001b[1;31mTraitError\u001b[0m: The 'east' trait of a Map instance expected a float, not the NoneType None." + ] + }, + { + "ename": "TraitError", + "evalue": "The 'east' trait of a Map instance expected a float, not the NoneType None.", + "output_type": "error", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[1;31mTraitError\u001b[0m Traceback (most recent call last)", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\ipywidgets\\widgets\\widget.py:773\u001b[0m, in \u001b[0;36mWidget._handle_msg\u001b[1;34m(self, msg)\u001b[0m\n\u001b[0;32m 771\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffer_paths\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;129;01min\u001b[39;00m data:\n\u001b[0;32m 772\u001b[0m _put_buffers(state, data[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffer_paths\u001b[39m\u001b[38;5;124m'\u001b[39m], msg[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffers\u001b[39m\u001b[38;5;124m'\u001b[39m])\n\u001b[1;32m--> 773\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43mstate\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 775\u001b[0m \u001b[38;5;66;03m# Handle a state request.\u001b[39;00m\n\u001b[0;32m 776\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m method \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mrequest_state\u001b[39m\u001b[38;5;124m'\u001b[39m:\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\ipywidgets\\widgets\\widget.py:655\u001b[0m, in \u001b[0;36mWidget.set_state\u001b[1;34m(self, sync_data)\u001b[0m\n\u001b[0;32m 652\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m name \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mkeys:\n\u001b[0;32m 653\u001b[0m from_json \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtrait_metadata(name, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mfrom_json\u001b[39m\u001b[38;5;124m'\u001b[39m,\n\u001b[0;32m 654\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_trait_from_json)\n\u001b[1;32m--> 655\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset_trait\u001b[49m\u001b[43m(\u001b[49m\u001b[43mname\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfrom_json\u001b[49m\u001b[43m(\u001b[49m\u001b[43msync_data\u001b[49m\u001b[43m[\u001b[49m\u001b[43mname\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:1764\u001b[0m, in \u001b[0;36mHasTraits.set_trait\u001b[1;34m(self, name, value)\u001b[0m\n\u001b[0;32m 1762\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhas_trait(name):\n\u001b[0;32m 1763\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m TraitError(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mClass \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m does not have a trait named \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mname\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m-> 1764\u001b[0m \u001b[38;5;28;43mgetattr\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mcls\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mname\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:690\u001b[0m, in \u001b[0;36mTraitType.set\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 689\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21mset\u001b[39m(\u001b[38;5;28mself\u001b[39m, obj: HasTraits, value: S) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m--> 690\u001b[0m new_value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_validate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 691\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 692\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:722\u001b[0m, in \u001b[0;36mTraitType._validate\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 720\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m value\n\u001b[0;32m 721\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mvalidate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m--> 722\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvalidate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 723\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m obj\u001b[38;5;241m.\u001b[39m_cross_validation_lock \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mFalse\u001b[39;00m:\n\u001b[0;32m 724\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_cross_validate(obj, value)\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:2755\u001b[0m, in \u001b[0;36mFloat.validate\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 2753\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mfloat\u001b[39m(value)\n\u001b[0;32m 2754\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(value, \u001b[38;5;28mfloat\u001b[39m):\n\u001b[1;32m-> 2755\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43merror\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 2756\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m t\u001b[38;5;241m.\u001b[39mcast(G, _validate_bounds(\u001b[38;5;28mself\u001b[39m, obj, value))\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:831\u001b[0m, in \u001b[0;36mTraitType.error\u001b[1;34m(self, obj, value, error, info)\u001b[0m\n\u001b[0;32m 825\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 826\u001b[0m e \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mThe \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m trait expected \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m, not \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mformat(\n\u001b[0;32m 827\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname,\n\u001b[0;32m 828\u001b[0m info \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minfo(),\n\u001b[0;32m 829\u001b[0m describe(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mthe\u001b[39m\u001b[38;5;124m\"\u001b[39m, value),\n\u001b[0;32m 830\u001b[0m )\n\u001b[1;32m--> 831\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m TraitError(e)\n", + "\u001b[1;31mTraitError\u001b[0m: The 'east' trait of a Map instance expected a float, not the NoneType None." + ] + }, + { + "ename": "TraitError", + "evalue": "The 'east' trait of a Map instance expected a float, not the NoneType None.", + "output_type": "error", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[1;31mTraitError\u001b[0m Traceback (most recent call last)", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\ipywidgets\\widgets\\widget.py:773\u001b[0m, in \u001b[0;36mWidget._handle_msg\u001b[1;34m(self, msg)\u001b[0m\n\u001b[0;32m 771\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffer_paths\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;129;01min\u001b[39;00m data:\n\u001b[0;32m 772\u001b[0m _put_buffers(state, data[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffer_paths\u001b[39m\u001b[38;5;124m'\u001b[39m], msg[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffers\u001b[39m\u001b[38;5;124m'\u001b[39m])\n\u001b[1;32m--> 773\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43mstate\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 775\u001b[0m \u001b[38;5;66;03m# Handle a state request.\u001b[39;00m\n\u001b[0;32m 776\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m method \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mrequest_state\u001b[39m\u001b[38;5;124m'\u001b[39m:\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\ipywidgets\\widgets\\widget.py:655\u001b[0m, in \u001b[0;36mWidget.set_state\u001b[1;34m(self, sync_data)\u001b[0m\n\u001b[0;32m 652\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m name \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mkeys:\n\u001b[0;32m 653\u001b[0m from_json \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtrait_metadata(name, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mfrom_json\u001b[39m\u001b[38;5;124m'\u001b[39m,\n\u001b[0;32m 654\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_trait_from_json)\n\u001b[1;32m--> 655\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset_trait\u001b[49m\u001b[43m(\u001b[49m\u001b[43mname\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfrom_json\u001b[49m\u001b[43m(\u001b[49m\u001b[43msync_data\u001b[49m\u001b[43m[\u001b[49m\u001b[43mname\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:1764\u001b[0m, in \u001b[0;36mHasTraits.set_trait\u001b[1;34m(self, name, value)\u001b[0m\n\u001b[0;32m 1762\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhas_trait(name):\n\u001b[0;32m 1763\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m TraitError(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mClass \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m does not have a trait named \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mname\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m-> 1764\u001b[0m \u001b[38;5;28;43mgetattr\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mcls\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mname\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:690\u001b[0m, in \u001b[0;36mTraitType.set\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 689\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21mset\u001b[39m(\u001b[38;5;28mself\u001b[39m, obj: HasTraits, value: S) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m--> 690\u001b[0m new_value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_validate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 691\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 692\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:722\u001b[0m, in \u001b[0;36mTraitType._validate\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 720\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m value\n\u001b[0;32m 721\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mvalidate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m--> 722\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvalidate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 723\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m obj\u001b[38;5;241m.\u001b[39m_cross_validation_lock \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mFalse\u001b[39;00m:\n\u001b[0;32m 724\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_cross_validate(obj, value)\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:2755\u001b[0m, in \u001b[0;36mFloat.validate\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 2753\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mfloat\u001b[39m(value)\n\u001b[0;32m 2754\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(value, \u001b[38;5;28mfloat\u001b[39m):\n\u001b[1;32m-> 2755\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43merror\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 2756\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m t\u001b[38;5;241m.\u001b[39mcast(G, _validate_bounds(\u001b[38;5;28mself\u001b[39m, obj, value))\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:831\u001b[0m, in \u001b[0;36mTraitType.error\u001b[1;34m(self, obj, value, error, info)\u001b[0m\n\u001b[0;32m 825\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 826\u001b[0m e \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mThe \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m trait expected \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m, not \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mformat(\n\u001b[0;32m 827\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname,\n\u001b[0;32m 828\u001b[0m info \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minfo(),\n\u001b[0;32m 829\u001b[0m describe(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mthe\u001b[39m\u001b[38;5;124m\"\u001b[39m, value),\n\u001b[0;32m 830\u001b[0m )\n\u001b[1;32m--> 831\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m TraitError(e)\n", + "\u001b[1;31mTraitError\u001b[0m: The 'east' trait of a Map instance expected a float, not the NoneType None." + ] + }, + { + "ename": "TraitError", + "evalue": "The 'east' trait of a Map instance expected a float, not the NoneType None.", + "output_type": "error", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[1;31mTraitError\u001b[0m Traceback (most recent call last)", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\ipywidgets\\widgets\\widget.py:773\u001b[0m, in \u001b[0;36mWidget._handle_msg\u001b[1;34m(self, msg)\u001b[0m\n\u001b[0;32m 771\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffer_paths\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;129;01min\u001b[39;00m data:\n\u001b[0;32m 772\u001b[0m _put_buffers(state, data[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffer_paths\u001b[39m\u001b[38;5;124m'\u001b[39m], msg[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffers\u001b[39m\u001b[38;5;124m'\u001b[39m])\n\u001b[1;32m--> 773\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43mstate\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 775\u001b[0m \u001b[38;5;66;03m# Handle a state request.\u001b[39;00m\n\u001b[0;32m 776\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m method \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mrequest_state\u001b[39m\u001b[38;5;124m'\u001b[39m:\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\ipywidgets\\widgets\\widget.py:655\u001b[0m, in \u001b[0;36mWidget.set_state\u001b[1;34m(self, sync_data)\u001b[0m\n\u001b[0;32m 652\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m name \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mkeys:\n\u001b[0;32m 653\u001b[0m from_json \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtrait_metadata(name, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mfrom_json\u001b[39m\u001b[38;5;124m'\u001b[39m,\n\u001b[0;32m 654\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_trait_from_json)\n\u001b[1;32m--> 655\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset_trait\u001b[49m\u001b[43m(\u001b[49m\u001b[43mname\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfrom_json\u001b[49m\u001b[43m(\u001b[49m\u001b[43msync_data\u001b[49m\u001b[43m[\u001b[49m\u001b[43mname\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:1764\u001b[0m, in \u001b[0;36mHasTraits.set_trait\u001b[1;34m(self, name, value)\u001b[0m\n\u001b[0;32m 1762\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhas_trait(name):\n\u001b[0;32m 1763\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m TraitError(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mClass \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m does not have a trait named \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mname\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m-> 1764\u001b[0m \u001b[38;5;28;43mgetattr\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mcls\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mname\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:690\u001b[0m, in \u001b[0;36mTraitType.set\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 689\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21mset\u001b[39m(\u001b[38;5;28mself\u001b[39m, obj: HasTraits, value: S) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m--> 690\u001b[0m new_value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_validate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 691\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 692\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:722\u001b[0m, in \u001b[0;36mTraitType._validate\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 720\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m value\n\u001b[0;32m 721\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mvalidate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m--> 722\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvalidate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 723\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m obj\u001b[38;5;241m.\u001b[39m_cross_validation_lock \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mFalse\u001b[39;00m:\n\u001b[0;32m 724\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_cross_validate(obj, value)\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:2755\u001b[0m, in \u001b[0;36mFloat.validate\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 2753\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mfloat\u001b[39m(value)\n\u001b[0;32m 2754\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(value, \u001b[38;5;28mfloat\u001b[39m):\n\u001b[1;32m-> 2755\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43merror\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 2756\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m t\u001b[38;5;241m.\u001b[39mcast(G, _validate_bounds(\u001b[38;5;28mself\u001b[39m, obj, value))\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:831\u001b[0m, in \u001b[0;36mTraitType.error\u001b[1;34m(self, obj, value, error, info)\u001b[0m\n\u001b[0;32m 825\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 826\u001b[0m e \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mThe \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m trait expected \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m, not \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mformat(\n\u001b[0;32m 827\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname,\n\u001b[0;32m 828\u001b[0m info \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minfo(),\n\u001b[0;32m 829\u001b[0m describe(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mthe\u001b[39m\u001b[38;5;124m\"\u001b[39m, value),\n\u001b[0;32m 830\u001b[0m )\n\u001b[1;32m--> 831\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m TraitError(e)\n", + "\u001b[1;31mTraitError\u001b[0m: The 'east' trait of a Map instance expected a float, not the NoneType None." + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">> reading coastlines: 1.20 sec\n", + "attemting to merge lines in MultiLineString to single LineString (if connected)\n", + ">> reading coastlines: 1.19 sec\n" + ] + }, + { + "ename": "TraitError", + "evalue": "The 'east' trait of a Map instance expected a float, not the NoneType None.", + "output_type": "error", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[1;31mTraitError\u001b[0m Traceback (most recent call last)", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\ipywidgets\\widgets\\widget.py:773\u001b[0m, in \u001b[0;36mWidget._handle_msg\u001b[1;34m(self, msg)\u001b[0m\n\u001b[0;32m 771\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffer_paths\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;129;01min\u001b[39;00m data:\n\u001b[0;32m 772\u001b[0m _put_buffers(state, data[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffer_paths\u001b[39m\u001b[38;5;124m'\u001b[39m], msg[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbuffers\u001b[39m\u001b[38;5;124m'\u001b[39m])\n\u001b[1;32m--> 773\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43mstate\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 775\u001b[0m \u001b[38;5;66;03m# Handle a state request.\u001b[39;00m\n\u001b[0;32m 776\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m method \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mrequest_state\u001b[39m\u001b[38;5;124m'\u001b[39m:\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\ipywidgets\\widgets\\widget.py:655\u001b[0m, in \u001b[0;36mWidget.set_state\u001b[1;34m(self, sync_data)\u001b[0m\n\u001b[0;32m 652\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m name \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mkeys:\n\u001b[0;32m 653\u001b[0m from_json \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtrait_metadata(name, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mfrom_json\u001b[39m\u001b[38;5;124m'\u001b[39m,\n\u001b[0;32m 654\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_trait_from_json)\n\u001b[1;32m--> 655\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset_trait\u001b[49m\u001b[43m(\u001b[49m\u001b[43mname\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfrom_json\u001b[49m\u001b[43m(\u001b[49m\u001b[43msync_data\u001b[49m\u001b[43m[\u001b[49m\u001b[43mname\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:1764\u001b[0m, in \u001b[0;36mHasTraits.set_trait\u001b[1;34m(self, name, value)\u001b[0m\n\u001b[0;32m 1762\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhas_trait(name):\n\u001b[0;32m 1763\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m TraitError(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mClass \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39m\u001b[38;5;18m__name__\u001b[39m\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m does not have a trait named \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mname\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m-> 1764\u001b[0m \u001b[38;5;28;43mgetattr\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mcls\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mname\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mset\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:690\u001b[0m, in \u001b[0;36mTraitType.set\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 689\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21mset\u001b[39m(\u001b[38;5;28mself\u001b[39m, obj: HasTraits, value: S) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m--> 690\u001b[0m new_value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_validate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 691\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 692\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:722\u001b[0m, in \u001b[0;36mTraitType._validate\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 720\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m value\n\u001b[0;32m 721\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(\u001b[38;5;28mself\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mvalidate\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[1;32m--> 722\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvalidate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 723\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m obj\u001b[38;5;241m.\u001b[39m_cross_validation_lock \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mFalse\u001b[39;00m:\n\u001b[0;32m 724\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_cross_validate(obj, value)\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:2755\u001b[0m, in \u001b[0;36mFloat.validate\u001b[1;34m(self, obj, value)\u001b[0m\n\u001b[0;32m 2753\u001b[0m value \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mfloat\u001b[39m(value)\n\u001b[0;32m 2754\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(value, \u001b[38;5;28mfloat\u001b[39m):\n\u001b[1;32m-> 2755\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43merror\u001b[49m\u001b[43m(\u001b[49m\u001b[43mobj\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 2756\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m t\u001b[38;5;241m.\u001b[39mcast(G, _validate_bounds(\u001b[38;5;28mself\u001b[39m, obj, value))\n", + "File \u001b[1;32mc:\\Users\\santjer\\AppData\\Local\\miniforge3\\envs\\IRISCC\\Lib\\site-packages\\traitlets\\traitlets.py:831\u001b[0m, in \u001b[0;36mTraitType.error\u001b[1;34m(self, obj, value, error, info)\u001b[0m\n\u001b[0;32m 825\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 826\u001b[0m e \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mThe \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m trait expected \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m, not \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mformat(\n\u001b[0;32m 827\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mname,\n\u001b[0;32m 828\u001b[0m info \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minfo(),\n\u001b[0;32m 829\u001b[0m describe(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mthe\u001b[39m\u001b[38;5;124m\"\u001b[39m, value),\n\u001b[0;32m 830\u001b[0m )\n\u001b[1;32m--> 831\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m TraitError(e)\n", + "\u001b[1;31mTraitError\u001b[0m: The 'east' trait of a Map instance expected a float, not the NoneType None." + ] } ], "source": [ @@ -355,6 +709,7 @@ " with solara.Card(\"xxx\", style={\"width\": \"100%\", \"padding\": \"10px\"}):\n", " solara.Text(\"text\")\n", "\n", + " \n", "###########################################################################################\n", "###########################################################################################\n", "###########################################################################################\n", @@ -371,6 +726,7 @@ " with solara.Row(gap=\"10px\", style={\"justify-content\": \"flex-start\", \"width\": \"80%\"}):\n", " solara.Button(\"xxx\", on_click=lambda: selected_tab.set('xxx'))\n", " \n", + "\n", " if selected_tab.value == 'UserInput':\n", " Tab_User_Input()\n", " elif selected_tab.value == 'GridGen':\n",