Bug report #20486

python error while using virtual layers in db manager

Added by Tobias Wendorff about 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:High
Assignee:-
Category:DB Manager
Affected QGIS version:3.5(master) Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:28306

Description

When trying to access virtual layers using DB Manager, a python error occures:

2018-11-14T11:21:11     WARNING    Traceback (most recent call last):
              File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py", line 444, in rowCount
              self._refreshIndex(parent, True)
              File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py", line 493, in _refreshIndex
              if item.populate():
              File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py", line 186, in populate
              tables = database.tables()
              File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\plugin.py", line 518, in tables
              tables = self.connector.getTables(schema.name if schema else None, sys_tables)
              File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\vlayers\connector.py", line 178, in getTables
              return self.getVectorTables()
              File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\vlayers\connector.py", line 196, in getVectorTables
              for _, l in QgsProject.instance().mapLayers():
             ValueError: too many values to unpack (expected 2)

History

#1 Updated by Giovanni Manghi about 6 years ago

  • Regression? changed from No to Yes
  • Subject changed from virtual layers breaks with a python error to python error while using virtual layers in db manager
  • Category changed from Virtual Layers to DB Manager
  • Priority changed from Normal to High

#2 Updated by Alexandre Neto about 6 years ago

Confirmed on Linux as well

#3 Updated by Victor Olaya about 6 years ago

it should be fixed by this 149726cfa5955f707441ec1c936094fccd0a33ec

#4 Updated by Alexander Bruy almost 6 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed
  • Operating System deleted (Microsoft Windows 7, 64-bit)

Fixed in master. Please test and reopen if necessary

Also available in: Atom PDF