A property named "time" raises DriverSupportError for ESRI Shapefiles
See original GitHub issueExpected behavior and actual behavior.
From https://github.com/Toblerity/Fiona/issues/572, I see that properties of type datetime.time
are not supported for ESRI Shapefiles, but surely a str
property named “time” is acceptable?
Fiona raises DriverSupportError: ESRI Shapefile does not support time fields
for schemas that have a property named “time”.
Steps to reproduce the problem.
Running this code:
import fiona
schema = {
"geometry": "Point",
"properties": {
"time": "str", # type is str, should be okay
}
}
c = fiona.collection("time_bug.shp", "w", "ESRI Shapefile", schema)
Gives this result:
Traceback (most recent call last):
File "/vagrant/fiona_time_bug.py", line 13, in <module>
c = fiona.collection("time_bug.shp", "w", "ESRI Shapefile", schema)
File "/opt/DataPortal/lib/python3.6/site-packages/fiona/env.py", line 405, in wrapper
return f(*args, **kwargs)
File "/opt/DataPortal/lib/python3.6/site-packages/fiona/__init__.py", line 263, in open
**kwargs)
File "/opt/DataPortal/lib/python3.6/site-packages/fiona/collection.py", line 145, in __init__
self._check_schema_driver_support()
File "/opt/DataPortal/lib/python3.6/site-packages/fiona/collection.py", line 419, in _check_schema_driver_support
raise DriverSupportError("ESRI Shapefile does not support time fields")
fiona.errors.DriverSupportError: ESRI Shapefile does not support time fields
Operating system
Linux-3.10.0-514.el7.x86_64-x86_64-with-centos-7.3.1611-Core Python 3.6.5
Fiona and GDAL version and provenance
Installed from PyPI via pip:
Fiona 1.8.3 GDAL 2.3.2
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Problem exporting geodataframe to Esri shapefile having ...
I had a geodataframe having 4 columns (viz. name, time, description, geometry fiels). I am ...
Read more >Number of shapes does not match number of table records
The following error occurs when adding a shapefile to an ArcMap Data Frame: Error: Number of shapes does not match number of table...
Read more >pyshp - PyPI
The Python Shapefile Library (PyShp) provides read and write support for the Esri Shapefile format. The Shapefile format is a popular Geographic Information ......
Read more >pandas geodataframe to shapefile, fixing datetime error
I have a geopandas dataframe and I am trying to export it to an ESRI Shapefile. herds_projectplan_ply.to_file(gdb_path ...
Read more >Shapefiles in ArcGIS Pro—ArcGIS Pro | Documentation
Here, edits are being made to a shapefile layer named Building. Deleting unnecessary fields. Adding a new field named BLDGTYPE. Changing the layer...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think this should be:
@mdklatt yes, you’re right. We’ll fix this in the next release. Next week, I think.