Bug report #8218
fTools "Line Intersection" does not work
| Status: | Closed | ||
|---|---|---|---|
| Priority: | Severe/Regression | ||
| Assignee: | - | ||
| Category: | Processing/QGIS | ||
| Affected QGIS version: | master | Regression?: | |
| Operating System: | Easy fix?: | ||
| Pull Request or Patch supplied: | No | Resolution: | |
| Crashes QGIS or corrupts data: | No | Copied to github as #: | 17032 |
Description
When I used "Line Intersection" tool, I got the following error message.
An error has occured while executing Python code:
Traceback (most recent call last):
File "C:\\OSGeo4W\\apps\\qgis-dev\\python\\plugins\\fTools\\tools\\doIntersectLines.py", line 96, in accept
self.compute(line1, line2, field1, field2, outPath, self.progressBar)
File "C:\\OSGeo4W\\apps\\qgis-dev\\python\\plugins\\fTools\\tools\\doIntersectLines.py", line 169, in compute
outFeat.setAttribute(0, v1)
KeyError: '0'
Python version:
2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
QGIS version:
1.9.0-Master Master, 630427f
Associated revisions
History
#1
Updated by Daniel Vaz over 12 years ago
Please, see issue #7073.
There is a hack that solves the problem (for simplest case tested for me).
Adding the following two lines before the while loop.
allAttrs = provider1.attributeIndexes() provider1.select(allAttrs) while provider1.nextFeature(inFeat):
#2
Updated by Minoru Akagi over 12 years ago
Daniel Vaz wrote:
Adding the following two lines before the while loop.
[...]
Probably you are using 1.8 and old APIs. We should use new APIs for 2.0.
#3
Updated by Daniel Vaz over 12 years ago
Fixing bug in pull request 702.
Plase see: https://github.com/qgis/Quantum-GIS/pull/702
PS: sorry for previous noise.
#4
Updated by Nathan Woodrow over 12 years ago
- Status changed from Open to Closed
Fixed in changeset 56210eb0b5c7914d246b1c82ad48e676b00b6557.
#5
Updated by Giovanni Manghi over 8 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.