Opened 6 years ago

Closed 6 years ago

#7246 closed defect (fixed)

OpenFailed error gives advice that can't be followed in some contexts

Reported by: sgillies Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.11.3
Severity: normal Keywords: shapefile shx
Cc:

Description

When calling OGROpen() on a shapefile with no .shx, a user can see this error:

Unable to open myshapefile.shx or myshapefile.SHX.Try --config SHAPE_RESTORE_SHX true to restore or create it

The usage recommendation in this error message is relevant to ogrinfo and other command line programs but not to developers using the C API or their users. Instead, we should provide an error message with more generic config option usage.

Also reported at https://github.com/Toblerity/Fiona/issues/548. GDAL version is 1.11, but I think this comes straight from the shapefile driver, so newer versions may also be affected.

Change History (2)

comment:2 by Even Rouault, 6 years ago

Resolution: fixed
Status: newclosed

In 41582:

Shape: Make shpopen error message more general (patch by sgillies, fixes https://github.com/OSGeo/gdal/pull/311, fixes #7246)

Note: See TracTickets for help on using tickets.