Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working with python plugins for QGIS.I developed my plugin and inorder to incooperate the same into QGIS i copied the folder in

C:\Documents and Settings\comp90\.qgis\python\plugins

I opened my QGIS exe and installed the same.It is shown under **Databases-->PG & SL. My code is as follows:

SUPPORTED_CONNECTORS = {'postgis':'1.5', 'spatialite':'1.6'}

def listDatabases(self):

    actionsDb = {}
    actions = DbConnection.ConnectionManager.getAvailableConnections()

    for a in actions:
        actionsDb[ unicode(a.text()) ] = a

    return actionsDb

def getAvailableConnections(self, conntypes=None):

    if conntypes == None:

        conntypes = ConnectionManager.SUPPORTED_CONNECTORS.keys()
    if not hasattr(conntypes, '__iter__'):
        conntypes = [conntypes]

    connections = []
    for c in conntypes:
        connection = self.getConnection( c )
        connections.extend( connection.getAvailableConnections() )
    return connections

def getAvailableConnections(self):
    connections = []

    settings = QSettings()
    settings.beginGroup( "/%s/connections" % self.getSettingsKey() )
    keys = settings.childGroups()
    for name in keys:
        connections.append( Connection.ConnectionAction(name, self.getTypeName()) )

    return connections

but the actionsDb is blank.In QGIS, the connection is established. When I try to open the plugin in QGIS ,it does not open because actionsDb is blank. What can be the problem??

share|improve this question
I'm a bit confused. Are you having trouble with RT Sql Layer or with your own plugin? – underdark Feb 16 '12 at 9:09
For this kind of problems try also the qgis-developer mailing list. – Giovanni Manghi Feb 16 '12 at 9:10
@underdark---With my own plugins.... – Poonam Narvekar Feb 16 '12 at 9:29
I don't think we can help without seeing your code. – underdark Feb 16 '12 at 17:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.