Is your feature request related to a problem? Please describe.
Uploading Shapefiles using Geonode does not support the .cpg file specified in the standard. This file specifies the text encoding in the .dbf file. When the encoding of the file is different from the default (UTF-8) for Geonode, an error is raised by the UI that is cryptic and does not appear to have anything to do with the actual issue. For example:
Describe the solution you'd like
Both the UI and REST endpoint support sending a .cpg file as part of the Shapefile. Geonode then decodes the text using the format specified in the file.
Describe alternatives you've considered
Have some way to specify the encoding used in the file. Either a dropdown on the upload page or a parameter in the API.
At the very least, specify that the upload error occured due to an encoding issue. The error above says tuple.index(x): x not in tuple. which appears to be downstream from the actual error.
Additional context
Here's an example shapefile and the Geonode logs from the failure. This file can be loaded into other tools (e.g. QGIS) just fine.
Geonode Encoding Error.zip
Is your feature request related to a problem? Please describe. Uploading Shapefiles using Geonode does not support the
.cpg
file specified in the standard. This file specifies the text encoding in the.dbf
file. When the encoding of the file is different from the default (UTF-8) for Geonode, an error is raised by the UI that is cryptic and does not appear to have anything to do with the actual issue. For example:Describe the solution you'd like Both the UI and REST endpoint support sending a
.cpg
file as part of the Shapefile. Geonode then decodes the text using the format specified in the file.Describe alternatives you've considered
tuple.index(x): x not in tuple.
which appears to be downstream from the actual error.Additional context Here's an example shapefile and the Geonode logs from the failure. This file can be loaded into other tools (e.g. QGIS) just fine. Geonode Encoding Error.zip