I am using QGIS version 2.18.9. I first create a graphical modeler and it is working. Then I export it to python script. While I am running the script I got following error massage.

"NoneType' object has no attribute 'getitem See log for more detail".

Can you explain the reason?

My script is shown below:

##cleanf=output vector
outputs_GRASS7V_CLEAN_1=processing.runalg('grass7:v.clean', outputs_GRASS7V_IN_DXF_1['output'],1,0.1,['200000.000000,700000.000000,200000.000000,700000.000000'],-1.0,0.0001,cleanf,None)

You are getting the error because of points in variable name. Variable name doesn't include points. Try to change outputs_GRASS7V.IN.DXF_1 into outputs_GRASS7V_IN_DXF_1 or something else without points.

  • thank you for your answer.I tried it ,but it doesn't work – Shanaka Herath Jun 13 '18 at 8:21
  • At least, I guess, you are getting different error, aren't you? – Kadir Şahbaz Jun 13 '18 at 10:27
  • I created another model and follow your advice.Yes,It is working.Thanks a lot for your comment.Now I further developed my script.Now I am getting another error called "NoneType' object has no attribute 'getitem".I have edited my question already.You can see my developed script above.I highly appreciate if you can help me further. – Shanaka Herath Jun 13 '18 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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