Hi Marco On Thu, Feb 3, 2011 at 3:38 PM, Marco Afonso <mafonso...@gmail.com> wrote: > Hello, > > Just want you to confirm that this is a bug or not in this plugin. > > When listing (refreshing) the schema/tables, if the postgis connected user > does not have permission to all schemas/tables, Python is returning a error > on line 256 on file postgis_utils.py indicating that the index i does not > exists: items[i] = geo_item > >> >> # merge geometry info to "items" >> for i, geo_item in enumerate(c.fetchall()): >> if geo_item[7]: >> items[i] = geo_item > > > I can see that there are 2 queries: somehow the second query may not return > the same number of records as in the first query. > > A solution that worked for me was: > >> >> # merge geometry info to "items" >> for i, geo_item in enumerate(c.fetchall()): >> if geo_item[7] and i < len(items): >> items[i] = geo_item
Thanks for the report. Would you mind to send me the output from first and second query in the scenario when you get the error (e.g. if you run those queries manually in pgadmin or similar tool)? I believe that the suggested fix will not work in all cases and might end up assigning incorrect geometries to the tables, so I'd like to check it before using your workaround. Regards Martin _______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer