I can run a Python script that uses qgsVectorLayer, qgsRasterLayer and many functions like processing:runalg("qgis.difference"......) and os.popen("gdalwarp -q -cutline.......) but if I want to run it another time, I must close QGIS first and reload it (error: file locked because used by other programs...) I want to close files handlers but I don't know which ones. What can I do in this case?
Asked
Active
Viewed 257 times
1
-
1To help you better, can you add your code? – Fran Raga May 15 '19 at 16:58
-
@FranRaga I edited my question , I added some of my code – Namoat May 16 '19 at 08:32
-
1Please, add code not a screenshot. – Fran Raga May 16 '19 at 08:37
-
When I copy paste my code here it lose its layout and it become hard to read it – Namoat May 16 '19 at 09:22
-
What version of qgis are you using? – Fran Raga May 16 '19 at 09:38
-
qgis version : 2.14.12 – Namoat May 16 '19 at 09:46
-
1Does this answer your question? Releasing PyQGIS file locks – Noxy Aug 01 '23 at 07:26
-
The simplest way to format your code is to copy/paste it in as text, highlight it and then click the Format button ({}). – PolyGeo Aug 01 '23 at 08:48

