[Qgis-developer] QGis PostGis_Manager Plugin 0.5.13
Marco Afonso
mafonso333 at gmail.com
Thu Feb 3 09:38:30 EST 2011
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
Sorry, Python in not my "first language" :)
Cheers,
Marco Afonso
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20110203/c5974080/attachment.html
More information about the Qgis-developer
mailing list