3

I have to add more than 20 fields to a lot of shapefiles using QGIS 2.4. I used to do it with the tablemanager plugin. Beside it is time consuming, misstakes can be made. So I want to automate that procedure through the graphical modeler.

enter image description here

I tested it with adding 2 fields and everything worked fine. But when I added all the algorithms it gave an error:

Error executing algorithm 2 [Errno 9] Bad file descriptor See log for more details

The log says:

Uncaught error while executing algorithm Traceback (most recent call last): Traceback (most recent call last): File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python/plugins\processing\core\GeoAlgorithm.py", line 217, in execute self.processAlgorithm(progress) File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python/plugins\processing\algs\qgis\AddTableField.py", line 75, in processAlgorithm self.getParameterValue(self.INPUT_LAYER)) File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python/plugins\processing\tools\dataobjects.py", line 215, in getObjectFromUri print _loadedLayers IOError: [Errno 9] Bad file descriptor

After a few hours I tried to run the model again without changing anything and then this error appeared: Error executing algorithm 6 [Errno 9] Bad file descriptor See log for more details

In the log the same explanation as above.

Can anyone help me understand what's happening here?

2
  • I did a test and it worked fine for me. For your final algorithm, enter a name for the Output layer. When you run the model, you will be prompted to output the final layer as a temporary layer or save it in a directory (whichever you want). See if this works.
    – Joseph
    Jan 22, 2015 at 11:26
  • Hi Joseph, In my initial model I already gave a name for the outputlayer in my final algorithm. I think it has something to do with the temporary files the model create during the process. When I empty /appdata/local/temp/processing, the error appears later on in the process (around 10th algrorithm).
    – PieterB
    Jan 23, 2015 at 8:11

1 Answer 1

1

I installed version 2.6.1 and now the model works without problems.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.