Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to use the aforementioned plugin with QGIS 1.7 and Postgres 9.0/PostGIS 1.5.

Added a PostGIS spatial layer w/out a problem and then clicked on the RT Sql layer button which displayed the main dialog. When I select Database-> , I got this error

BTW - the ...'s is the QGIS plugin path. Left it out for clarity):

An error has occured while executing Python code:

Traceback (most recent call last):
  File ".../python/plugins\rt_sql_layer\ManagerWindow.py", line 112, in dbConnectSlot
    self.dbConnect( self.sender() )
  File ".../python/plugins\rt_sql_layer\ManagerWindow.py", line 163, in dbConnect
    self.refreshTable()
  File ".../python/plugins\rt_sql_layer\ManagerWindow.py", line 272, in refreshTable
    model.loadFromDb(self.db)
  File ".../python/plugins\rt_sql_layer\DatabaseModel.py", line 250, in loadFromDb
    self.tree.constructTreeFromDb(self.db)
  File ".../python/plugins\rt_sql_layer\DatabaseModel.py", line 96, in constructTreeFromDb
    list_tables = db.list_geotables()
  File ".../python/plugins\rt_sql_layer\connectors\postgis.py", line 275, in list_geotables
    items[i] = geo_item
IndexError: list assignment index out of range

Python version:
2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]


QGIS version:
1.7.0-Wroclaw Wroclaw, 63ecdd7

I never used python in the past but I had a look at the source code and it seems that the query the plugin is running to get the spatial tables into a tree view is not returning anything? Had a go to running the sql statements in PostGIS and they all seem to return data. Then again- not sure if I am looking at the right place!

Have you seen this before? Has it got anything to do with the s/w versions? Plugin was developed for an earlier version and something has changed in the latest?

share|improve this question
    
I had the same error before, but as I closed the also-ruuning PostGIS Manager, the RT sql layer ran well! –  Heinz Apr 27 '13 at 9:05
    
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. –  dassouki Apr 27 '13 at 9:49
add comment

closed as too localized by underdark May 27 '13 at 10:57

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.