[Qgis-developer] error for QGIS tutorials in python - adding
rasters to canvas
Martin Dobias
wonder.sk at gmail.com
Wed Jan 23 15:01:46 EST 2008
2008/1/23 volkan kepoglu <vkepoglu at gmail.com>:
> downloaded QGIS tutorials in python, changed qgis_prefix and runned
> 2_basic_main_window and 3_basic_labelling successfully,
> but 4_adding_rasters_to_canvas gives the following error;
>
> vkepoglu at vkepoglu:~/qgis/tutorials/4_adding_rasters_to_canvas$ python
> mainwindow.py
> Traceback (most recent call last):
> File " mainwindow.py", line 76, in addLayer
> layer.setColorRampingType(QgsRasterLayer.BLUE_GREEN_RED)
> AttributeError: setColorRampingType
Ah, that will be caused by the recent refactoring of the raster classes.
Peter / Tim - can you suggest how to change the code to make it working again?
> how can ı fix?
> or the most important than to fix this,
> how can ı learn to qgis bindings to python.
>
> where should ı look for reference of python bindings
>
> http://wiki.qgis.org/qgiswiki/PythonBindings, is there any other references?
Today I've updated PythonBindings wiki page with some resources
(listed in top part in Using PyQGIS section). Basically it's good to
look at QGIS C++ API reference, QGIS blog, tutorials ported to Python
and QGIS plugins that have been done already. (all links listed there)
Martin
More information about the Qgis-developer
mailing list