Bug report #2413

save as shapefile with column names > 10 chars fails "Creation of an attribute failed"

Added by Anita Graser about 13 years ago. Updated about 13 years ago.

Assignee:nobody -
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:12473


The error message should be adjusted to point the user to a solution (shortening the column names) or offer auto-truncation of column names

See related forum topic:


#1 Updated by Jürgen Fischer about 13 years ago

See also #2151. Apparently OGR trims (or used to trim) the fieldnames by itself. What GDAL version is in use? Do the trimmed fieldnames produce duplicate names in use case that triggered this ticket?

ea9ae019 (SVN r12891) improves the error reporting a bit by including OGRs error message and reporting which column produces duplicate names when truncated.

#2 Updated by Anita Graser about 13 years ago

Replying to [comment:1 jef]:
Yes, trimming produces duplicate column names. This seems to cause the failure.

#3 Updated by Jürgen Fischer about 13 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

fixed in ea9ae019 (SVN r12891).

Also available in: Atom PDF