Skip to main content
added 56 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

You should change two lines. The first one is about PyQGIS 3, the other is about Python 3.

  1. Change QgsMapLayerRegistry.instance().mapLayers() into QgsProject.instance().mapLayers(). Please check this answer out for more information.

  2. Change layerMap.iteritems() into layerMap.items(). Please check this postWhat is the difference between dict.items() and dict.iteritems()? and answers for additional information.

You should change two lines. The first one is about PyQGIS 3, the other is about Python 3.

  1. Change QgsMapLayerRegistry.instance().mapLayers() into QgsProject.instance().mapLayers(). Please check this answer out for more information.

  2. Change layerMap.iteritems() into layerMap.items(). Please check this post and answers for additional information.

You should change two lines. The first one is about PyQGIS 3, the other is about Python 3.

  1. Change QgsMapLayerRegistry.instance().mapLayers() into QgsProject.instance().mapLayers(). Please check this answer out for more information.

  2. Change layerMap.iteritems() into layerMap.items(). Please check What is the difference between dict.items() and dict.iteritems()? and answers for additional information.

added 48 characters in body
Source Link
Kadir Şahbaz
  • 78k
  • 57
  • 257
  • 404

You should change two lines. The first one is about PyQGIS 3, the other is about Python 3.

  1. Change QgsMapLayerRegistry.instance().mapLayers() into QgsProject.instance().mapLayers(). Please check this answer out for more information.

  2. Change layerMap.iteritems() into layerMap.items(). Please check this post and answers for additional information.

You should change two lines. The first one is about PyQGIS 3, the other is about Python 3.

  1. Change QgsMapLayerRegistry.instance().mapLayers() into QgsProject.instance().mapLayers(). Please check this answer out.

  2. Change layerMap.iteritems() into layerMap.items(). Please check this post and answers.

You should change two lines. The first one is about PyQGIS 3, the other is about Python 3.

  1. Change QgsMapLayerRegistry.instance().mapLayers() into QgsProject.instance().mapLayers(). Please check this answer out for more information.

  2. Change layerMap.iteritems() into layerMap.items(). Please check this post and answers for additional information.

Source Link
Kadir Şahbaz
  • 78k
  • 57
  • 257
  • 404

You should change two lines. The first one is about PyQGIS 3, the other is about Python 3.

  1. Change QgsMapLayerRegistry.instance().mapLayers() into QgsProject.instance().mapLayers(). Please check this answer out.

  2. Change layerMap.iteritems() into layerMap.items(). Please check this post and answers.