TypeErrors with exporting from Spatially Enabled Dataframes and re-symbolising data in map widget.

233
1
09-29-2021 01:00 PM
markjones6
New Contributor II

Hi,

I've been getting errors when using a spatially enabled dataframe and the map widget in a jupyter notebook. The issues seem to occur when I either try to symbolise my data or try to export.

When exporting using the below, 

sdf.spatial.to_featureclass(location=r"c:\apps\FGDB.gdb")

I get a TypeError: cannot add field: 'fieldname' 

 

The second error is when using the map widget in the notebook, whilst I can spatialise my dataframe using a default renderer, if i try to change this to a custom renderer:

sf.spatial.plot(map_widget = m1, renderer_type='u', col='FIELD_NAME')

Then the map widget returns an error - "Could not update layer.  TypeError:  Cannot read properties of null (reading 'renderer')  See the browser console for more info.

The only thing that i can think of is that my input data has a number of string columns which when imported using pandas, have a dtype=object, which i then convert to a string and replace all Nulls with "N/A".  The root cause seems to be that these columns still contains a Null value which is throwing the renderer and also the export commands.

 

Any advice greatly appreciated!

1 Reply
PaulRacco
New Contributor II

Same issue!

0 Kudos