2

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:

##Testing=name
##drawingdxf=file
##cleanf=output vector
outputs_GRASS7V_IN_DXF_1=processing.runalg('grass7:v.in.dxf',drawingdxf,'1',True,False,True,False,False,True,['200000.000000,700000.000000,200000.000000,700000.000000'],0,None)
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)
0

1 Answer 1

3

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.

3
  • thank you for your answer.I tried it ,but it doesn't work Commented Jun 13, 2018 at 8:21
  • At least, I guess, you are getting different error, aren't you? Commented Jun 13, 2018 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. Commented Jun 13, 2018 at 15:11

Your Answer

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

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