Skip to content
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

DB-Manager: python error #14369

Closed
qgib opened this issue Oct 24, 2011 · 1 comment
Closed

DB-Manager: python error #14369

qgib opened this issue Oct 24, 2011 · 1 comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins

Comments

@qgib
Copy link
Contributor

qgib commented Oct 24, 2011

Author Name: aperi2007 - (aperi2007 -)
Original Redmine Issue: 4437

Redmine category:python_plugins
Assignee: Giuseppe Sucameli


Hi,
opening the db-manager plugin and try-ing to open a postgis connection,
I see this python error:

An error has occured while executing Python code:

Traceback (most recent call last):
  File "C:/Users/peri/.qgis/python/plugins\\db_manager\\db_model.py", line 399, in rowCount
    self._refreshIndex( parent )
  File "C:/Users/peri/.qgis/python/plugins\\db_manager\\db_model.py", line 443, in _refreshIndex
    if item.populate():
  File "C:/Users/peri/.qgis/python/plugins\\db_manager\\db_model.py", line 158, in populate
    schemas = connection.database().schemas()
  File "C:/Users/peri/.qgis/python/plugins\\db_manager\\db_plugins\\plugin.py", line 222, in schemas
    return map(lambda x: self.schemasFactory(x, self), schemas)
  File "C:/Users/peri/.qgis/python/plugins\\db_manager\\db_plugins\\plugin.py", line 222, in 
    return map(lambda x: self.schemasFactory(x, self), schemas)
  File "C:/Users/peri/.qgis/python/plugins\\db_manager\\db_plugins\\postgis\\plugin.py", line 149, in schemasFactory
    return PGSchema(row, db)
  File "C:/Users/peri/.qgis/python/plugins\\db_manager\\db_plugins\\postgis\\plugin.py", line 161, in __init__
    self.tableCount = len(self.tables())
  File "C:/Users/peri/.qgis/python/plugins\\db_manager\\db_plugins\\plugin.py", line 292, in tables
    return self.database().tables(self)
  File "C:/Users/peri/.qgis/python/plugins\\db_manager\\db_plugins\\plugin.py", line 251, in tables
    tables = self.connector.getTables(schema.name if schema else None)
  File "C:/Users/peri/.qgis/python/plugins\\db_manager\\db_plugins\\postgis\\connector.py", line 179, in getTables
    rasters = self.getRasterTables(schema)
  File "C:/Users/peri/.qgis/python/plugins\\db_manager\\db_plugins\\postgis\\connector.py", line 338, in getRasterTables
    self._execute(c, sql)
  File "C:/Users/peri/.qgis/python/plugins\\db_manager\\db_plugins\\postgis\\connector.py", line 670, in _execute
    raise DbError(e, sql)
DbError: missing FROM-clause entry for table "geo"
LINE 3:      CASE WHEN geo.r_column IS NOT NULL THEN geo.r_column E...
                        ^

Query:
SELECT 
cla.relname, nsp.nspname, cla.relkind = 'v', pg_get_userbyid(relowner), cla.reltuples, cla.relpages, 
CASE WHEN geo.r_column IS NOT NULL THEN geo.r_column ELSE att.attname END, 
geo.pixel_types,
geo.scale_x,
geo.scale_y,
geo.out_db,
geo.srid

FROM pg_class AS cla 
JOIN pg_namespace AS nsp ON 
nsp.oid = cla.relnamespace

JOIN pg_attribute AS att ON 
att.attrelid = cla.oid AND 
att.atttypid = 'raster'::regtype OR 
att.atttypid IN (SELECT oid FROM pg_type WHERE typbasetype='raster'::regtype ) 



WHERE cla.relkind IN ('v', 'r')  AND nspname = 'dbt'  
ORDER BY nsp.nspname, cla.relname, att.attname

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


QGIS version:
1.8.0-Trunk Trunk, b34f924

Python path: ['C:\\\\Users\\\\peri\\\\.qgis\\\\python\\\\plugins\\\\cswclient', 'C:/OSGeo4W/apps/qgis-dev/./python', 'C:/Users/peri/.qgis/python', 'C:/Users/peri/.qgis/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\\\\OSGeo4W\\\\apps\\\\orfeotoolbox\\\\python', 'C:\\\\', 'C:\\\\OSGeo4W\\\\bin\\\\python25.zip', 'C:\\\\OSGeo4W\\\\apps\\\\Python25\\\\DLLs', 'C:\\\\OSGeo4W\\\\apps\\\\Python25\\\\lib', 'C:\\\\OSGeo4W\\\\apps\\\\Python25\\\\lib\\\\plat-win', 'C:\\\\OSGeo4W\\\\apps\\\\Python25\\\\lib\\\\lib-tk', 'C:\\\\OSGeo4W\\\\apps\\\\qgis-dev\\\\bin', 'C:\\\\OSGeo4W\\\\apps\\\\Python25', 'C:\\\\OSGeo4W\\\\apps\\\\Python25\\\\lib\\\\site-packages', 'C:\\\\OSGeo4W\\\\apps\\\\Python25\\\\lib\\\\site-packages\\\\win32', 'C:\\\\OSGeo4W\\\\apps\\\\Python25\\\\lib\\\\site-packages\\\\win32\\\\lib', 'C:\\\\OSGeo4W\\\\apps\\\\Python25\\\\lib\\\\site-packages\\\\Pythonwin', 'C:\\\\OSGeo4W\\\\apps\\\\Python25\\\\lib\\\\site-packages\\\\wx-2.8-msw-unicode', 'C:\\\\OSGeo4W\\\\apps\\\\qgis-dev\\\\python\\\\plugins\\\\fTools\\\\tools']

I use qgis-dev b34f924 on postgres 9.1.1 and ostgis 2.0 on windows7

@qgib
Copy link
Contributor Author

qgib commented Nov 8, 2011

Author Name: Giuseppe Sucameli (@brushtyler)


DB Manager plugin is not a core QuantumGIS python plugin so this isn't the right place to open tickets.
I planned to move it to QGis Redmine trac soon, but in this moment you have to send errors directly to the maintainer (it's me) or to qgis ML.


  • resolution was changed from to invalid
  • assigned_to_id was changed from pcavallini to Giuseppe Sucameli
  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins labels May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins
Projects
None yet
Development

No branches or pull requests

1 participant