[Qgis-user] some errors with Python connected to launching DB Manager and PostGIS Manager

Bartek Wol gacek333 at gmail.com
Fri Aug 17 04:17:39 PDT 2012


OK so updating on the error - managed to solve the problem with not
starting DB Manager - the missing file was psycopg2 (found out thanx
to friend) but the error connected to python and postgres persists and
is really bugging me..

so now it looks like that:

for DB Manager (when I launch DB Manager it starts smoothly but when I
click at the database to enlarge the list the error popps out, the
funny thing is that all of the functions work properly just the errors
annoys all the time):

Traceback (most recent call last):
  File "C:\PROGRA~2\Quantum GIS
Lisboa\apps\qgis\python\plugins\db_manager\db_manager.py", line 99, in
itemChanged
    self.refreshTabs()
  File "C:\PROGRA~2\Quantum GIS
Lisboa\apps\qgis\python\plugins\db_manager\db_manager.py", line 150,
in refreshTabs
    self.info.showInfo( item )
  File "C:\PROGRA~2\Quantum GIS
Lisboa\apps\qgis\python\plugins\db_manager\info_viewer.py", line 69,
in showInfo
    self._showDatabaseInfo(item)
  File "C:\PROGRA~2\Quantum GIS
Lisboa\apps\qgis\python\plugins\db_manager\info_viewer.py", line 99,
in _showDatabaseInfo
    html += connection.database().info().toHtml()
  File "C:\PROGRA~2\Quantum GIS
Lisboa\apps\qgis\python\plugins\db_manager\db_plugins\info_model.py",
line 107, in toHtml
    spatial_info = self.spatialInfo()
  File "C:\PROGRA~2\Quantum GIS
Lisboa\apps\qgis\python\plugins\db_manager\db_plugins\info_model.py",
line 62, in spatialInfo
    ("Use stats:", info[5])
IndexError: tuple index out of range

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


Wersja QGIS:
1.8.0-Lisboa Lisboa, 6416f38

Lokalizacja Pythona:
['C:/Users/Verruu/.qgis//python/plugins\\sextante',
'C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python',
'C:/Users/Verruu/.qgis//python',
'C:/Users/Verruu/.qgis//python/plugins', 'C:/PROGRA~2/Quantum GIS
Lisboa/apps/qgis/./python/plugins', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\bin\\python27.zip', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\DLLs', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib\\plat-win', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib\\lib-tk', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\qgis\\bin', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib\\site-packages', 'C:\\PROGRA~2\\Quantum
GIS Lisboa\\apps\\Python27\\lib\\site-packages\\PIL',
'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib\\site-packages\\win32',
'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib\\site-packages\\win32\\lib',
'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib\\site-packages\\Pythonwin',
'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode',
'~/.qgis/python',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\imgshowhide\\logic',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\imgshowhide\\gui',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\inasafe',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\mmqgis/forms',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\openlayersov\\logic',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\openlayersov\\gui',
'/usr/share/qgis/python',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\QuickMultiAttributeEdit/forms',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\ziplayers\\logic',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\ziplayers\\gui',
'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\qgis\\python\\plugins\\fTools\\tools']

and for the PostGIS Manager (error popps when starting Manager - all
functions work):

Traceback (most recent call last):
  File "C:/Users/Verruu/.qgis//python/plugins\postgis_manager\ManagerWindow.py",
line 113, in dbConnectInit
    self.dbConnect(selected)
  File "C:/Users/Verruu/.qgis//python/plugins\postgis_manager\ManagerWindow.py",
line 171, in dbConnect
    self.dbInfo()
  File "C:/Users/Verruu/.qgis//python/plugins\postgis_manager\ManagerWindow.py",
line 238, in dbInfo
    self.updateView()
  File "C:/Users/Verruu/.qgis//python/plugins\postgis_manager\ManagerWindow.py",
line 285, in updateView
    self.tabChanged( self.tabs.currentIndex() )
  File "C:/Users/Verruu/.qgis//python/plugins\postgis_manager\ManagerWindow.py",
line 212, in tabChanged
    self.txtMetadata.showDbInfo()
  File "C:/Users/Verruu/.qgis//python/plugins\postgis_manager\MetadataBrowser.py",
line 35, in showDbInfo
    html += '
Use stats:
%s' % gis_info[5]
IndexError: tuple index out of range

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


Wersja QGIS:
1.8.0-Lisboa Lisboa, 6416f38

Lokalizacja Pythona:
['C:/Users/Verruu/.qgis//python/plugins\\sextante',
'C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python',
'C:/Users/Verruu/.qgis//python',
'C:/Users/Verruu/.qgis//python/plugins', 'C:/PROGRA~2/Quantum GIS
Lisboa/apps/qgis/./python/plugins', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\bin\\python27.zip', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\DLLs', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib\\plat-win', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib\\lib-tk', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\qgis\\bin', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27', 'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib\\site-packages', 'C:\\PROGRA~2\\Quantum
GIS Lisboa\\apps\\Python27\\lib\\site-packages\\PIL',
'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib\\site-packages\\win32',
'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib\\site-packages\\win32\\lib',
'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib\\site-packages\\Pythonwin',
'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode',
'~/.qgis/python',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\imgshowhide\\logic',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\imgshowhide\\gui',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\inasafe',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\mmqgis/forms',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\openlayersov\\logic',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\openlayersov\\gui',
'/usr/share/qgis/python',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\QuickMultiAttributeEdit/forms',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\ziplayers\\logic',
'C:\\Users\\Verruu\\.qgis\\python\\plugins\\ziplayers\\gui',
'C:\\PROGRA~2\\Quantum GIS
Lisboa\\apps\\qgis\\python\\plugins\\fTools\\tools']

Any sugestions on how to deal with this problems would be very much appreciated

Bartosz

2012/8/16 Bartek Wol <gacek333 at gmail.com>:
> Still having this issues with not working DB Manager and buggy PostGIS
> manager, anyone could help? is it system error because I can work on
> both managers on linux ubuntu natty 11.10 qgis 1.8.0 and the problem
> persists in windows 7.
>
> 2012/8/14 Bartek Wol <gacek333 at gmail.com>:
>> Hi
>>
>> using qgis 1.8.0 windows 7 64 bit got some weird errors all of a
>> sudden with DB Manager and PostGIS Manager
>> my error messages are:
>>
>> for DB Manager (not runing after error message):
>>
>> Wystąpił błąd podczas wykonywania kodu Pythona:
>>
>> Traceback (most recent call last):
>>   File "C:/PROGRA~2/Quantum GIS
>> Lisboa/apps/qgis/./python/plugins\db_manager\db_manager_plugin.py",
>> line 66, in run
>>     from db_manager import DBManager
>>   File "C:/PROGRA~2/Quantum GIS
>> Lisboa/apps/qgis/./python\qgis\utils.py", line 309, in _import
>>     mod = _builtin_import(name, globals, locals, fromlist, level)
>>   File "C:\PROGRA~2\Quantum GIS
>> Lisboa\apps\qgis\python\plugins\db_manager\db_manager.py", line 28, in
>>     from .info_viewer import InfoViewer
>>   File "C:/PROGRA~2/Quantum GIS
>> Lisboa/apps/qgis/./python\qgis\utils.py", line 309, in _import
>>     mod = _builtin_import(name, globals, locals, fromlist, level)
>>   File "C:\PROGRA~2\Quantum GIS
>> Lisboa\apps\qgis\python\plugins\db_manager\info_viewer.py", line 26,
>> in
>>     from .db_plugins.plugin import BaseError, DbError, DBPlugin, Schema, Table
>>   File "C:/PROGRA~2/Quantum GIS
>> Lisboa/apps/qgis/./python\qgis\utils.py", line 309, in _import
>>     mod = _builtin_import(name, globals, locals, fromlist, level)
>>   File "C:\PROGRA~2\Quantum GIS
>> Lisboa\apps\qgis\python\plugins\db_manager\db_plugins\__init__.py",
>> line 69, in
>>     initDbPluginList()
>>   File "C:\PROGRA~2\Quantum GIS
>> Lisboa\apps\qgis\python\plugins\db_manager\db_plugins\__init__.py",
>> line 45, in initDbPluginList
>>     DBPLUGIN_ERRORS.append( u"%s: %s" % (name, e.message) )
>> UnicodeDecodeError: 'ascii' codec can't decode byte 0xbf in position
>> 23: ordinal not in range(128)
>>
>> Wersja Pythona:
>> 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]
>>
>>
>> Wersja QGIS:
>> 1.8.0-Lisboa Lisboa, 6416f38
>>
>> and for PostGIS Manager (will launch and run after the message):
>>
>> Wystąpił błąd podczas wykonywania kodu Pythona:
>>
>> Traceback (most recent call last):
>>   File "C:/Users/Verruu/.qgis//python/plugins\postgis_manager\ManagerWindow.py",
>> line 113, in dbConnectInit
>>     self.dbConnect(selected)
>>   File "C:/Users/Verruu/.qgis//python/plugins\postgis_manager\ManagerWindow.py",
>> line 171, in dbConnect
>>     self.dbInfo()
>>   File "C:/Users/Verruu/.qgis//python/plugins\postgis_manager\ManagerWindow.py",
>> line 238, in dbInfo
>>     self.updateView()
>>   File "C:/Users/Verruu/.qgis//python/plugins\postgis_manager\ManagerWindow.py",
>> line 285, in updateView
>>     self.tabChanged( self.tabs.currentIndex() )
>>   File "C:/Users/Verruu/.qgis//python/plugins\postgis_manager\ManagerWindow.py",
>> line 212, in tabChanged
>>     self.txtMetadata.showDbInfo()
>>   File "C:/Users/Verruu/.qgis//python/plugins\postgis_manager\MetadataBrowser.py",
>> line 35, in showDbInfo
>>     html += '
>> Use stats:
>> %s' % gis_info[5]
>> IndexError: tuple index out of range
>>
>> Wersja Pythona:
>> 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]
>>
>>
>> Wersja QGIS:
>> 1.8.0-Lisboa Lisboa, 6416f38
>>
>>
>> Please help how to make it run correctly and smoothly
>>
>>
>> Bartosz
>
>
>
> --
> Gacek



-- 
Gacek



More information about the Qgis-user mailing list