[Qgis-developer] Geoprocessing error

Carlos Dávila cdavilam at jemila.jazztel.es
Fri Apr 11 13:57:24 EDT 2008


John C. Tull escribió:
> Horst,
>
> I tried performing a union of two vector files with multiple polygons,
> and received the error below. This was using the 0.35 version of the
> plugin with William Kyngesburye's RC1 binary of qgis (I still cannot
> get the plugin to work for me in my development builds). The union
> worked in ubuntu with version 0.35 of the plugin and latest svn.
>
>
> An error has occured while executing Python code:
>
> Traceback (most recent call last):
> File
> "/Users/jctull/.qgis//python/plugins/geoprocessing/geoprocessing.py",
> line 242, in geoprocessing
>  self.union(myLayerA, myLayerB, myPath, myBool)
> File
> "/Users/jctull/.qgis//python/plugins/geoprocessing/geoprocessing.py",
> line 266, in union
>  resultList = self.makeUnion(vlayerA, vlayerB)
> File
> "/Users/jctull/.qgis//python/plugins/geoprocessing/geoprocessing.py",
> line 832, in makeUnion
>  unionResult = self.makeIntersection(vlayerA, vlayerB)
> File
> "/Users/jctull/.qgis//python/plugins/geoprocessing/geoprocessing.py",
> line 998, in makeIntersection
>  fet.setAttributeMap(mAttributes)
> AttributeError: setAttributeMap 
I'm getting a similar error with buffer or difference tools:
An error has occured while executing Python code:

Traceback (most recent call last):
 File "/C/Mis
documentos/.qgis//python/plugins/geoprocessing/geoprocessing.py", line
233, in geoprocessing
  self.buffering(myLayerA, myParam, myPath, myBool, mergeBool)
 File "/C/Mis
documentos/.qgis//python/plugins/geoprocessing/geoprocessing.py", line
448, in buffering
  vlayer = self.getVectorLayerByName(myLayer)
 File "/C/Mis
documentos/.qgis//python/plugins/geoprocessing/geoprocessing.py", line
516, in getVectorLayerByName
  vlayer = QgsVectorLayer(unicode(layer.source(),'latin1'),
unicode(myName,'latin1'), providerName)
UnboundLocalError: local variable 'providerName' referenced before
assignment

System is debian testing, qgis r8328, Qt 4.3.3 and plugin v0.35. I think
error can be related with the layers being in edition mode, but I can't
reproduce error in another computer (the only difference is Qt 4.3.4).
Before the error a dialog entitled "Meldung" appears with the message
"Kein Provider gefundel!" (Shouldn't it be translated?).

Apart from this issue, I would like to suggest a couple of things:
1) The plugin has a "Save as:" box where you select a directory to save
the new layer. As you don't select a name but a directory, wouldn't it
be better to say "Save to:"?
2) Could output layer name for buffers be input_layer_bufferX.shp
instead of bufferX?

Regards and thanks for so useful plugin.
Carlos


More information about the Qgis-developer mailing list