Bug report #7021

Line Intersection tool produces error when using jus one input layer

Added by Sibi Prabakaran almost 12 years ago. Updated over 7 years ago.

Status:Closed
Priority:Normal
Assignee:Sibi Prabakaran
Category:Processing/QGIS
Affected QGIS version:master Regression?:
Operating System:Ubuntu Linux Easy fix?:
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:16115

Description

I'm using Quantum GIS version 1.8.0-Lisboa and trying to create intersection point using Intersection tool. (Vector -> Analysis tools -> Line Intersections )

I'm using Ubuntu Linux, version 12.04.

But when I do that for my shapefile, It pops up the following error in the dialog box:

An error has occured while executing Python code:

Traceback (most recent call last):
  File "/usr/share/qgis/python/plugins/fTools/tools/doIntersectLines.py", line 96, in accept
    self.compute(line1, line2, field1, field2, outPath, self.progressBar)
  File "/usr/share/qgis/python/plugins/fTools/tools/doIntersectLines.py", line 174, in compute
    outFeat.addAttribute(0, atMap1[index1])
KeyError: 0

Python version:
2.7.3 (default, Aug  1 2012, 05:27:35) 
[GCC 4.6.3]

QGIS version:
1.8.0-Lisboa Lisboa, exported

Python path: ['/usr/share/qgis/python', '/home/sibi/.qgis//python', '/home/sibi/.qgis//python/plugins', '/usr/share/qgis/python/plugins', '/usr/local/lib/python2.7/dist-packages/identi-0.1.3-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/pyipmsg-0.0.1.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages', '/usr/local/lib/python2.7/dist-packages/rope-0.9.4-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/ropemode-0.2-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/ropemacs-0.7-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-installer', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode', '/usr/share/qgis/python/plugins/fTools/tools']

Shapefile.tar (10 KB) Sibi Prabakaran, 2013-01-21 11:05 AM


Related issues

Related to QGIS Application - Bug report #7073: Intersection Tool Produces two Intersection points on the... Closed 2013-01-29

Associated revisions

Revision 298f0c00
Added by Jürgen Fischer almost 12 years ago

cleanup doIntersectLines.py and fix #7021

History

#1 Updated by Giovanni Manghi almost 12 years ago

  • Category set to 44

please attach sample data. thanks!

#2 Updated by Sibi Prabakaran almost 12 years ago

It didn't work for me for any of the shapefiles I tried. Anyway, I have attached a simple shapefile which produces the same error for me.

Thanks!

#3 Updated by Giovanni Manghi almost 12 years ago

  • Affected QGIS version changed from 1.8.0 to master
  • Subject changed from Line Intersection tool produces Error to Line Intersection tool produces error when using jus one input layer

Sibi Prabakaran wrote:

It didn't work for me for any of the shapefiles I tried. Anyway, I have attached a simple shapefile which produces the same error for me.

Thanks!

the tool seems to work only with two different input layers, anyway it should not give a python error or it should also work within the same layer.

#4 Updated by Sibi Prabakaran almost 12 years ago

  • % Done changed from 0 to 100
  • Assignee set to Sibi Prabakaran

Pull has been submitted in Github for patching it up.

Pull Request URL: https://github.com/qgis/Quantum-GIS/pull/404

#5 Updated by Jürgen Fischer almost 12 years ago

  • Status changed from Open to Closed

#6 Updated by Giovanni Manghi over 7 years ago

The "ftools" category is being removed from the tracker, changing the category of this ticket to "Processing/QGIS" to not leave the category orphaned.

Also available in: Atom PDF