You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invalid field type <type 'list'>
Traceback (most recent call last):
File "/Users/rdchlads/tethys/src/tethys_apps/tethysapp/gssha_model_builder/controllers.py", line 321, in create_model
gpd.iloc[[0]].to_file(watershed_shapefile_path)
File "/Users/rdchlads/tethys/miniconda/envs/tethys/lib/python2.7/site-packages/geopandas/geodataframe.py", line 343, in to_file
to_file(self, filename, driver, schema, **kwargs)
File "/Users/rdchlads/tethys/miniconda/envs/tethys/lib/python2.7/site-packages/geopandas/io/file.py", line 63, in to_file
c.write(feature)
File "/Users/rdchlads/tethys/miniconda/envs/tethys/lib/python2.7/site-packages/fiona/collection.py", line 341, in write
self.writerecords([record])
File "/Users/rdchlads/tethys/miniconda/envs/tethys/lib/python2.7/site-packages/fiona/collection.py", line 335, in writerecords
self.session.writerecs(records, self)
File "fiona/ogrext.pyx", line 1029, in fiona.ogrext.WritingSession.writerecs (fiona/ogrext.c:18014)
File "fiona/ogrext.pyx", line 325, in fiona.ogrext.OGRFeatureBuilder.build (fiona/ogrext.c:7057)
ValueError: Invalid field type <type 'list'>
@snowman2 Lists are not supported data types to store in shapefiles. If you need to store the bounding box in columns, calling the frame gdf (using gpd as the name of your frame is discouraged, since gpd is the standard shorthand name used on import for geopandas), then you can you can do:
Here is the dataframe printout:
Here is the error when dumping to shapefile:
SOLUTION: Remove the bbox column.
The text was updated successfully, but these errors were encountered: