<div dir="ltr"><div>Hi devs</div><div>I'm trying to do a Python Script in Processing without an input layer and generate an output layer based on a number of fields that respects an order, name, type of field, precision.</div><div><br></div><div>The problem: I have some standard procedures that use a template shapefile. Most of the time users create a new template or truncate existing layers.</div><div><br></div><div>To save some clicks what I'm trying to do is create instantly the templates without user lose time. I'm using processing to get the advantage of batch mode. <br></div><div><br></div><div>This is my actual code but crashes when I run (see .py in attach)</div><div><br></div><div>I think the problem is in the moment of writing the output file. <br></div><div><br></div><div>Kind regards<br></div><br></div>