Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fTools "Line Intersection" does not work #17032

Closed
qgib opened this issue Jul 4, 2013 · 5 comments
Closed

fTools "Line Intersection" does not work #17032

qgib opened this issue Jul 4, 2013 · 5 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Jul 4, 2013

Author Name: Minoru Akagi (@minorua)
Original Redmine Issue: 8218
Affected QGIS version: master
Redmine category:processing/qgis


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

@qgib
Copy link
Contributor Author

qgib commented Jul 5, 2013

Author Name: Daniel Vaz (Daniel Vaz)


Please, see issue #16157.

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):

@qgib
Copy link
Contributor Author

qgib commented Jul 5, 2013

Author Name: Minoru Akagi (@minorua)


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.

@qgib
Copy link
Contributor Author

qgib commented Jul 6, 2013

Author Name: Daniel Vaz (Daniel Vaz)


Fixing bug in pull request 702.
Plase see: #702

PS: sorry for previous noise.

@qgib
Copy link
Contributor Author

qgib commented Jul 10, 2013

Author Name: Nathan Woodrow (@NathanW2)


Fixed in changeset "56210eb0b5c7914d246b1c82ad48e676b00b6557".


  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


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

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms labels May 24, 2019
@qgib qgib added this to the Version 2.0.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant