[Qgis-developer] rectangle oval digitizing and CAD Tools

Jürgen E. Fischer jef at norbit.de
Thu Mar 21 09:41:16 PDT 2013


Hi Paolo,

On Thu, 21. Mar 2013 at 17:32:08 +0100, Paolo Cavallini wrote:
> Errore durante l'esecuzione di codice Python:
> 
> Traceback (most recent call last):
>   File
> "/home/paolo/.qgis//python/plugins/rectovalDigit/rectovaldigit.py",
> line 251, in createFeature
>     f.initAttributes(fields.count())
> AttributeError: 'QgsFeature' object has no attribute 'initAttributes'

1.8?  initAttributes is part of the new vector api.

>   File
> "/home/paolo/.qgis//python/plugins/cadtools/tools/lineintersectiontool.py",
> line 76, in intersection
>     cadutils.addGeometryToCadLayer(QgsGeometry.fromPoint(p))
>   File "/home/paolo/.qgis//python/plugins/cadtools/tools/cadutils.py",
> line 36, in addGeometryToCadLayer
>     QgsMapLayerRegistry().instance().addMapLayer(vl, True)
> AttributeError: 'QgsMapLayerRegistry' object has no attribute
> 'addMapLayer'

Some version in between?   IIRC addMapLayer is in 1.8, was temporarily removed
from master, but readded recently.


> Errore durante l'esecuzione di codice Python:
> 
> Traceback (most recent call last):
>   File
> "/home/paolo/.qgis//python/plugins/cadtools/tools/horizontalverticaldigitizer.py",
> line 95, in canvasPressEvent
>     self.createFeature()
>   File
> "/home/paolo/.qgis//python/plugins/cadtools/tools/horizontalverticaldigitizer.py",
> line 136, in createFeature
>     layerEPSG = layer.srs().epsg()
> AttributeError: 'QgsVectorLayer' object has no attribute 'srs'

1.8?  it's .crs(), but epsg() was removed too use authid().



Jürgen

-- 
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-31
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de
committ(ed|ing) to Quantum GIS                         IRC: jef on FreeNode                         

-- 
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502



More information about the Qgis-developer mailing list