Bug report #9603

Error message with processing tool "Extract by location"

Added by Pauline C. about 10 years ago. Updated almost 9 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/Core
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:18181

Description

Hi,
In the toolbox when using the tool "Extract by location" (QGIS Geoalgorithms > Vector selection tools) I have no result and got the following Error message

'QgsVectorLayer' object has no attribute 'field'

With the log

Traceback (most recent call last):|Traceback (most recent call last):|

File "C:\\Users\\PC/.qgis2/python/plugins\\processing\\core\\GeoAlgorithm.py", line 202, in execute|
  self.processAlgorithm(progress)|
  File "C:\\Users\\PC/.qgis2/python/plugins\\processing\\algs\\ftools\\ExtractByLocation.py", line 77, in processAlgorithm|
  writer = output.getVectorWriter(layer.fields(),|

AttributeError: 'QgsVectorLayer' object has no attribute 'fields'|

Project and layers have same CRS,
and the spatial selection works with the ftools "Select by location" or plugin "spatial query"

I don't know how to solve it, and use it in a model.
Thanks

(QGIS via osgeo4w version 2.0.1, W7)

Associated revisions

Revision 40942fa7
Added by Alexander Bruy about 10 years ago

[processing] fix old API calls in Extract by location tool (fix #9603)

History

#1 Updated by Giovanni Manghi about 10 years ago

  • Affected QGIS version changed from 2.0.1 to master
  • Operating System deleted (Windows7)
  • Target version changed from Version 2.0.0 to Version 2.2

Confirmed on the latest version of processing and Linux.

#2 Updated by Alexander Bruy about 10 years ago

  • Status changed from Open to Closed

#3 Updated by Giovanni Manghi almost 9 years ago

  • Category changed from 94 to Processing/Core

Also available in: Atom PDF