Bug report #5200

RT_Sql_layer: error python on startup

Added by aperi2007 - over 12 years ago. Updated over 12 years ago.

Status:Closed
Priority:Normal
Assignee:Giuseppe Sucameli
Category:Python plugins
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:14940

Description

Hi,
When I choose, in the RT_Sql_Layer a db-connection on postgis,
I have this python error:

An error has occured while executing Python code:

Traceback (most recent call last):
  File "C:\\Users\\peri/.qgis/python/plugins\
t_sql_layer\\ManagerWindow.py", line 112, in dbConnectSlot
    self.dbConnect( self.sender() )
  File "C:\\Users\\peri/.qgis/python/plugins\
t_sql_layer\\ManagerWindow.py", line 168, in dbConnect
    self.dbInfo()
  File "C:\\Users\\peri/.qgis/python/plugins\
t_sql_layer\\ManagerWindow.py", line 251, in dbInfo
    self.updateView()
  File "C:\\Users\\peri/.qgis/python/plugins\
t_sql_layer\\ManagerWindow.py", line 318, in updateView
    self.tabChanged( self.tabs.currentIndex() )
  File "C:\\Users\\peri/.qgis/python/plugins\
t_sql_layer\\ManagerWindow.py", line 221, in tabChanged
    self.txtMetadata.showDbInfo()
  File "C:\\Users\\peri/.qgis/python/plugins\
t_sql_layer\\MetadataBrowser.py", line 34, in showDbInfo
    gis_info = self.db.get_spatial_info()
  File "C:\\Users\\peri/.qgis/python/plugins\
t_sql_layer\\connectors\\postgis.py", line 192, in get_spatial_info
    self._exec_sql(c, "SELECT postgis_lib_version(), postgis_scripts_installed(), postgis_scripts_released(), postgis_geos_version(), postgis_proj_version(), postgis_uses_stats()")
  File "C:\\Users\\peri/.qgis/python/plugins\
t_sql_layer\\connectors\\postgis.py", line 783, in _exec_sql
    raise DbError(e)
DbError: function postgis_uses_stats() does not exist
LINE 1: ..., postgis_geos_version(), postgis_proj_version(), postgis_us...
                                                            ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

Query:
SELECT postgis_lib_version(), postgis_scripts_installed(), postgis_scripts_released(), postgis_geos_version(), postgis_proj_version(), postgis_uses_stats()

Python version:
2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]

QGIS version:
1.9.90-Alpha Alpha, c5769bf

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\\\\python27.zip', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\DLLs', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\plat-win', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\lib-tk', 'C:\\\\osgeo4w\\\\apps\\\\qgis-dev\\\\bin', 'C:\\\\osgeo4w\\\\apps\\\\Python27', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\PIL', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32\\\\lib', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Pythonwin', 'C:\\\\osgeo4w\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\wx-2.8-msw-unicode', '.', 'C:\\\\Users\\\\peri\\\\.qgis\\\\python\\\\plugins\\\\QuickMultiAttributeEdit/forms', 'C:\\\\osgeo4w\\\\apps\\\\qgis-dev\\\\python\\\\plugins\\\\fTools\\\\tools']

I'm using postgis 2.0 beta3 version for windows

History

#1 Updated by Giuseppe Sucameli over 12 years ago

  • Resolution set to invalid
  • Assignee changed from Paolo Cavallini to Giuseppe Sucameli
  • Status changed from Open to Closed

QGis trac is the wrong place to open ticket for non-core plugins.

I moved your ticket to the RT_Sql_layer plugin trac, now it's #5201.

Also available in: Atom PDF