-
Notifications
You must be signed in to change notification settings - Fork 31
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
IndexError: list index out of range #8
Comments
Hi, I´ll try to reproduce later, API seems to down right now.. Cheers |
Sorry, can´t reproduce here, no matter how I do it. If you run the 'Dissolve' tool on a random layer, what is the the output layer called? Might be, that this is a language specific thing. I´m looking for layers called 'Dissolved' and rename them. If your language pack calls it smth else, this could crash. Cheers |
Well, I changed language to english and tried it again. Same error. So what I did: I am not a programmer but I am asking myself if '-1' is a valid list index: What else can I provide to get this problem solved? |
Hi, no worries, '-1' is used to index the last element in a list, it´s entirely fine. Let me talk to the ORS guys, I think, the 'Dissolve' feature is obsolete anyways. Before the revamp of the API, the accessibility areas were Multipolygons with lots of holes, now they seem to be very consistently single polygons. But I need to confirm this before taking it out. Will keep you posted |
Looks like the 'dissolve' option can be removed: And you´re right, dissolve happens in any case as of now. Honestly, I can´t remember why I put it in as (fake) optional. The code will apparently always dissolve the polygons on the "AA_Mins" field. Since this is now obsolete, I´ll remove those lines and post a new version sometime this week. It´s still weird that your installation does something mine doesn´t, but unless we do a Teamviewer session, this is hard to resolve. Let´s see what happens after I fixed it. |
Okay, I tried it on a clean install on different computer. I experienced no problems with that install. Guess the other installation of QGIS is just broken. |
Hi, |
Perfect. No error anymore. Thank you! |
Hi,
performing an accessibility calculation I always get a python error. It happens if I use the 'Map now!' (with a sligthly different error msg) and when using a point layer.
As the error's result one gets a broken dissolve layer with one entry only.
If you need further clearification please let me know.
BR
`Ein Fehler trat bei der Ausführung von Python-Code auf:
IndexError: list index out of range
Traceback (most recent call last):
File "C:/Users/USERNAME/.qgis2/python/plugins\OSMtools\osm_tools_access.py", line 243, in pointAnalysis
self.dissolveFields(layer_out, fields_diss)
File "C:/Users/USERNAME/.qgis2/python/plugins\OSMtools\osm_tools_access.py", line 308, in dissolveFields
layer_dissolved = QgsMapLayerRegistry.instance().mapLayersByName("Dissolved")[-1]
IndexError: list index out of range
Python-Version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
QGIS-Version: 2.18.6 Las Palmas, 5f369b0 `
The text was updated successfully, but these errors were encountered: