[Qgis-developer] DB Manager SQL Error with "?non uft8 tables?"

Alexandre Neto senhor.neto at gmail.com
Tue Sep 24 02:44:00 PDT 2013


While trying to open SQL Window with a Postgis Database, I get the error
below.

I can see that there are some problems with utf-8, also because my database
has some Latin1 encoded tables. Using another "empty" database I don't get
this error.

This is new both in 2.0.1 (dev) and 2.1.0, the same database worked well in
both 1.8 and 1.9. I'm using Windows 7 64 in this machine. I will try in a
linux machine latter

Should I post a ticket for this? Or just wait a bit more for the packaging
fixes.

Best Regards,

Alexandre Neto

An error has occured while executing Python code:
> Traceback (most recent call last):
>   File
> "C:/OSGeo4W/apps/qgis-dev/./python/plugins\db_manager\db_manager.py", line
> 183, in runSqlWindow
>     dlg = DlgSqlWindow(self.iface, db, self)
>   File
> "C:/OSGeo4W/apps/qgis-dev/./python/plugins\db_manager\dlg_sql_window.py",
> line 55, in __init__
>     SqlCompleter(self.editSql, self.db)
>   File
> "C:/OSGeo4W/apps/qgis-dev/./python/plugins\db_manager\completer.py", line
> 34, in __init__
>     dictionary = db.connector.getSqlDictionary()
>   File
> "C:/OSGeo4W/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\connector.py",
> line 917, in getSqlDictionary
>     for row in c.fetchall():
>   File "C:\OSGeo4W\apps\Python27\lib\encodings\utf_8.py", line 16, in
> decode
>     return codecs.utf_8_decode(input, errors, True)
> UnicodeDecodeError: 'utf8' codec can't decode bytes in position 6-7:
> invalid continuation byte
> Python version:
> 2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
>
> QGIS version:
> 2.1.0-Master Master, 773e0d4
> Python path: ['C:/OSGeo4W/apps/qgis-dev/./python/plugins\\sextante',
> 'C:/OSGeo4W/apps/qgis-dev/./python/plugins\\processing',
> 'C:/OSGeo4W/apps/qgis-dev/./python',
> u'C:\\Users\\alexandre.neto/.qgis2/python',
> u'C:\\Users\\alexandre.neto/.qgis2/python/plugins',
> 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\\Program Files
> (x86)\\ArcGIS\\bin', '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\\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:\\OSGeo4W\\apps\\qgis-dev\\python\\plugins\\fTools\\tools']
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130924/b8dc718f/attachment.html>


More information about the Qgis-developer mailing list