[QGIS-Developer] processing runalg in code (not in console) problem

Stefano Masera stefano.masera at arpa.piemonte.it
Mon Sep 11 07:42:31 PDT 2017


Hi list, 

I have a plugin that generate a shape in a temp directory using processing in the code (not in console). 
After using it, at the end of the plugin I try to delete the temp directory, but I get an error because the directory is used by another process. 
This is the step by step: 

- open plugin 
- create a temp directory 
- create a shape in the temp directory with processing, code: processing.runalg(...) 
- use the shape 
- try to delete the temp directory (with the shape inside) and I have an access error. 

I suppose the processing algorithm didn't close the file... 
I know I can try by using memory layer, but actually I didn't wan't to use this solution. 
What can I do? 

Thanks 
Stefano 






***************************** 
Stefano Masera 
Arpa Piemonte 
Via Pio VII, 9 - 10135 Torino 
www.arpa.piemonte.it 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170911/8c2ba5a1/attachment.html>


More information about the QGIS-Developer mailing list