Bug report #19257

Python error when overwriting SHP-file

Added by Magnus Nilsson almost 6 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Processing/Modeller
Affected QGIS version:3.2 Regression?:No
Operating System:Windows 10, 64 bit Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27085

Description

When I run a model with SHP as output in a processing model, it works fine. When I run the same model again, without removing the SHP-file from the previous run, I get this Python error:

Processing algorithm…

Algorithm 'modell' starting…

Indataparametrar:

{ 'indata' : 'C:/Users/Magnus/Desktop/Modellresultat/Resultat.shp', 'native:dropmzvalues_1:Resultat' : 'C:/Users/Magnus/Desktop/Modellresultat/Resultat.shp' }

Förbered algoritm: native:dropmzvalues_1

Kör Släng M/Z-värden [1/1]

Indataparametrar:

{ DROP_M_VALUES: False, DROP_Z_VALUES: False, INPUT: 'C:/Users/Magnus/Desktop/Modellresultat/Resultat.shp', OUTPUT: 'C:/Users/Magnus/Desktop/Modellresultat/Resultat.shp' }

Kunde inte skapa lager C:/Users/Magnus/Desktop/Modellresultat/Resultat.shp: Skapandet av datakälla misslyckades (OGR-fel: C:/Users/Magnus/Desktop/Modellresultat/Resultat.shp is not a directory.)

Ett fel uppstod vid körning av Släng M/Z-värden

Ett fel uppstod vid körning av Släng M/Z-värden

Beräkningen misslyckades efter 0.06 sekunder

I think that overwriting the previous SHP-fil should be default. Perhaps also a setting for letting the user choose what to do in these cases.

Also available in: Atom PDF