Bug report #8657

Error in DB Manager SQL Window with

Added by Alexandre Neto about 7 years ago. Updated about 7 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:DB Manager
Affected QGIS version:2.0.1 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:No Copied to github as #:17387

Description

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. 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

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']

History

#1 Updated by Giovanni Manghi about 7 years ago

  • Status changed from Open to Feedback

I cannot replicate on both Windows and Linux (also the server was tested on Windows and Linux). Please provide more details, or even better a a connection to test this issue.

#2 Updated by Alexandre Neto about 7 years ago

Sorry, I was not yet able to make more tests to my database. I plan to backup the db, and then start deleting the tables on of a time to see if it's data related. Also, I'm not able to provide a connection to the database. Since it is a very specific problem, feel free to close the ticket, I reopen it if I have details about the problem.

#3 Updated by Giovanni Manghi about 7 years ago

  • Resolution set to worksforme
  • Status changed from Feedback to Closed

ok Alexandre, I'm closing this. Please reopen it if you find a way to replicate the issue.

Also available in: Atom PDF