I am trying to add a point by using the pyqgis code below:

layer = iface.activeLayer()  # point layer

Then the marker becomes add feature symbology to add a point. When I click the canvas it gives me the error which says "Add Feature: Wrong editing tool, cannot apply the 'capture polygon' tool on this vector layer in picture" in the picture.

If I close and re-open QGIS it works. I guess the reason is making editing processes on polygon type vector layers. After adding point again by using the code it gives that error. It seems like editing polygon stays open. But I close that by using layer.commitChanges(). How can I solve that problem?

enter image description here

  • 1
    Which QGIS 3 version are you using? I cannot replicate this on 3.8. – Joseph Oct 23 '19 at 9:29
  • In QGIS 3.8. As I said, it appears after these steps. Maybe there is another reason. – Mustafa Uçar Oct 23 '19 at 12:14

Browse other questions tagged or ask your own question.