Bug report #6932

gdaltools stopped to work on qgis master

Added by Giovanni Manghi almost 12 years ago. Updated over 10 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:GDAL Tools
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:16047

Description

if you have a raster loaded it returns this python error

Traceback (most recent call last):
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\GdalTools\\GdalTools.py", line 319, in doWarp
self.runToolDialog( d )
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\GdalTools\\GdalTools.py", line 377, in runToolDialog
dlg.show_()
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\GdalTools\\tools\\widgetPluginBase.py", line 69, in show_
self.initialize()
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\GdalTools\\tools\\widgetPluginBase.py", line 60, in initialize
self.onLayersChanged()
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\GdalTools\\tools\\doWarp.py", line 113, in onLayersChanged
self.inSelector.setLayers( Utils.LayerRegistry.instance().getRasterLayers() )
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\GdalTools\\tools\\inOutSelector.py", line 202, in setLayers
self.combo.addItem( l.name(), l.getLayerID() )
AttributeError: 'QgsRasterLayer' object has no attribute 'getLayerID'

sometimes when loading a raster

Traceback (most recent call last):
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\GdalTools\\tools\\doInfo.py", line 97, in onLayersChanged
self.inSelector.setLayers( Utils.LayerRegistry.instance().getRasterLayers() )
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\GdalTools\\tools\\inOutSelector.py", line 202, in setLayers
self.combo.addItem( l.name(), l.getLayerID() )
AttributeError: 'QgsRasterLayer' object has no attribute 'getLayerID'

when removing a raster

Traceback (most recent call last):
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\GdalTools\\tools\\GdalTools_utils.py", line 167, in removeLayer
LayerRegistry.layers = filter( lambda x: x.getLayerID() != layerId, LayerRegistry.layers)
File "C:/OSGeo4W/apps/qgis-dev/./python/plugins\\GdalTools\\tools\\GdalTools_utils.py", line 167, in
LayerRegistry.layers = filter( lambda x: x.getLayerID() != layerId, LayerRegistry.layers)
AttributeError: 'QgsRasterLayer' object has no attribute 'getLayerID'

tested on qgis master on Windows (will try also Linux).

Associated revisions

Revision 62d99772
Added by Giuseppe Sucameli almost 12 years ago

fix #6932 (due to deprecated getLayerID method removal)

History

#1 Updated by Giovanni Manghi almost 12 years ago

  • Crashes QGIS or corrupts data changed from No to Yes

it sometimes even cause qgis to crash

#2 Updated by Filipe Dias almost 12 years ago

Confirmed on Ubuntu 12.04

QGIS version
1.9.0-Master
QGIS code revision
exported
Compiled against Qt
4.8.1
Running against Qt
4.8.1
Compiled against GDAL/OGR
1.9.2
Running against GDAL/OGR
1.9.2
GEOS Version
3.3.3
PostgreSQL Client Version
9.1.5
SpatiaLite Version
3.1.0-RC2
QWT Version
5.2.2
PROJ.4 Version
480
QScintilla2 Version

#3 Updated by Paolo Cavallini almost 12 years ago

  • Assignee changed from Giuseppe Sucameli to anonymous -

#4 Updated by Giuseppe Sucameli almost 12 years ago

  • Status changed from Open to Closed

#5 Updated by Jürgen Fischer over 10 years ago

  • Assignee deleted (anonymous -)

Also available in: Atom PDF