qissue-bot / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
http://qgis.org
GNU General Public License v2.0
0 stars 0 forks source link

ftools: error in select by location #1656

Closed qissue-bot closed 5 years ago

qissue-bot commented 5 years ago

Author Name: bjpfei - (bjpfei -) Original Redmine Issue: 1669, https://issues.qgis.org/issues/1669

Original Assignee: cfarmer -


1.) open select by location

2.) choose two db-layers (seems that it doesn't matter if line or polygon

3.) ok

ftools version 0.5.9 You get a python error

"/home/bjsvwpfe/.qgis/python/plugins/fTools/tools/doSelectByLocation.py", line 61, in compute geomLayer = [[QgsGeometry]](feat.geometry()) [[TypeError]]: argument 1 of [[QgsGeometry]]() has an invalid type

thx

qissue-bot commented 5 years ago

Original Redmine Comment Author Name: Giovanni Manghi (Giovanni Manghi) Original Date: 2009-07-09T13:50:55.000Z


I cannot replicate the python error (using ftools 0.5.10) under ubuntu 9.04/win xp and qgis 1.2 but I can produce and replicate qgis freeze using the same "select by location" tool.

Take the qgis sample dataset and pick a polygon layer (ex. grassland) and a line layer (ex. trails and majrivers): if I select features in grassland intersecting features in trails is all ok, if repeat the same but with majrivers instead of trails, than wgis freezes.

qissue-bot commented 5 years ago

Original Redmine Comment Author Name: Horst Düster (Horst Düster) Original Date: 2009-07-09T21:39:25.000Z


The error occurs when you use [[PostGIS]] Layer for the analysis. The following error is reported:

Traceback (most recent call last):
  File "/usr/local/qgis-trunk/share/qgis/python/plugins/fTools/tools/doSelectByLocation.py", line 52, in accept
    self.compute(inPoly, inPts, self.cmbModify.currentText())
  File "/usr/local/qgis-trunk/share/qgis/python/plugins/fTools/tools/doSelectByLocation.py", line 64, in compute
    geomLayer = [[QgsGeometry]](feat.geometry())
[[TypeError]]: argument 1 of [[QgsGeometry]]() has an invalid type
qissue-bot commented 5 years ago

Original Redmine Comment Author Name: Giovanni Manghi (Giovanni Manghi) Original Date: 2009-07-09T23:06:29.000Z


Ok, confirmed also this error when using postgis layers:

An error has occured while executing Python code:

Traceback (most recent call last):
  File "/usr/local/share/qgis/python/plugins/fTools/tools/doSelectByLocation.py", line 52, in accept
    self.compute(inPoly, inPts, self.cmbModify.currentText())
  File "/usr/local/share/qgis/python/plugins/fTools/tools/doSelectByLocation.py", line 64, in compute
    geomLayer = [[QgsGeometry]](feat.geometry())
[[TypeError]]: argument 1 of [[QgsGeometry]]() has an invalid type

Python version:
2.6.2 (release26-maint, Apr 19 2009, 02:11:59) 
[GCC 4.3.3]

Python path:['/usr/local/share/qgis/python', '/home/gio/.qgis//python/plugins', '/usr/local/share/qgis/python/plugins', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/var/lib/python-support/python2.6', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/var/lib/python-support/python2.6/gtk-2.0', '/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode', '/usr/local/lib/python2.6/dist-packages', '/usr/local/share/qgis/python/plugins/fTools/tools']
qissue-bot commented 5 years ago

Original Redmine Comment Author Name: Giovanni Manghi (Giovanni Manghi) Original Date: 2009-12-01T00:43:56.000Z


All this issues are confirmed in the latest trunk qgis code.

qissue-bot commented 5 years ago

Original Redmine Comment Author Name: cfarmer - (cfarmer -) Original Date: 2010-03-30T13:01:15.000Z


Should be fixed in commit:67376a6e (SVN r13206)

-Carson

qissue-bot commented 5 years ago

Original Redmine Comment Author Name: bderstine - (bderstine -) Original Date: 2011-02-18T08:35:27.000Z


I seem to be getting a similar error when running on two very large polygon vector shapefiles (select features in a layer with 820,154 small footprint records, that intersect features in a layer with 7,766 large footprint records).
using fTools 0.5.10, qGIS 1.6.0:

An error has occured while executing Python code:

Traceback (most recent call last): File "C:\QUANTU~1\apps\qgis\python\plugins\fTools\tools\doSelectByLocation.py", line 53, in accept self.compute(inPoly, inPts, self.cmbModify.currentText()) File "C:\QUANTU~1\apps\qgis\python\plugins\fTools\tools\doSelectByLocation.py", line 78, in compute print len(intersects) IOError: [Errno 9] Bad file descriptor

Python version: 2.5.2 (commit:c5cd2930 (SVN r253):60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]

qissue-bot commented 5 years ago

Original Redmine Comment Author Name: cfarmer - (cfarmer -) Original Date: 2011-02-20T10:07:54.000Z


Replying to [comment:7 bderstine]:

I seem to be getting a similar error when running on two very large polygon vector shapefiles: IOError: [Errno 9] Bad file descriptor

The above error is not related to the previously posted error, this 'new error' is a Windows IO problem that we have encountered before. This being the case, this issue has also already been resolved in trunk. Please ensure that you are in fact using the latest version of QGIS, and also the latest version of fTools (which is in fact the one installed by default). Looking at the source for the "select by location" tool, the offending print statement is no longer there in recent versions.

-Carson

qissue-bot commented 5 years ago

Original Redmine Comment Author Name: bderstine - (bderstine -) Original Date: 2011-02-21T16:21:21.000Z


Carson, thanks for the response. I was using the Standalone Installer of release 1.6.0, but have now switched to the OSGeo4W Installer using the qgis-dev package in order to get the nightly builds of trunk. It works great.