Bug report #19723

Exporting as DGN with QgsVectorFileWriter.writeAsVectorFormat gives an error with code 3

Added by Kadir S about 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:Even Rouault
Category:Data Provider/OGR
Affected QGIS version:3.3(master) Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27548

Description

QgsVectorFileWriter.writeAsVectorFormat(layer, target_dgn, 'utf8', None, 'DGN', skipAttributeCreation = True)

writeAsVectorFormat gives code 3 error (ErrCreateLayer) with 'DGN' parameter and exports nothing. When changed into 'dgn', it works.

It's the same in QGIS 3.2.1.
QGIS 3.2.1 gives (3, 'Creation of layer failed (OGR error: )') error.


Related issues

Related to QGIS Application - Bug report #19722: Exporting as DGN with "Save As..." gives an error. Closed 2018-08-28

Associated revisions

Revision 6b620193
Added by Even Rouault about 6 years ago

QgsVectorFileWriter: fix DGN creation (fixes #19722, fixes #19723)

Revision 9dd14065
Added by Even Rouault about 6 years ago

Merge pull request #7979 from rouault/fix_19722

QgsVectorFileWriter: fix DGN creation (fixes #19722, fixes #19723)

History

#1 Updated by Giovanni Manghi about 6 years ago

  • Affected QGIS version changed from 2.18.22 to 3.3(master)
  • Subject changed from Exporting as DGN with QgsVectorFileWriter.writeAsVectorFormat gives an error with code 3. to Exporting as DGN with QgsVectorFileWriter.writeAsVectorFormat gives an error with code 3
  • Category changed from Unknown to Data Provider/OGR

Related to #19722 ?

#2 Updated by Jürgen Fischer about 6 years ago

  • Related to Bug report #19722: Exporting as DGN with "Save As..." gives an error. added

#3 Updated by Even Rouault about 6 years ago

  • Assignee set to Even Rouault

#4 Updated by Even Rouault about 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF