Bug report #16730

Updated by Jürgen Fischer about 4 years ago

It happens that I created (via ogr2ogr) a GPKG file from a KML one.

This GPKG file works ok in QGIS when layers are added via the "add vector layer" dialog.

In DB Manager the connection to this datasource can be established, but then when expanding it an error is returned.

Master and 2.18.9 both affected.

<pre>


UnboundLocalError: local variable 'geomname' referenced before assignment
Traceback (most recent call last):
File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py", line 440, in rowCount
self._refreshIndex(parent, True)
File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py", line 491, in _refreshIndex
if item.populate():
File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py", line 182, in populate
tables = database.tables()
File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\plugin.py", line 513, 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\gpkg\connector.py", line 275, in getTables
vectors = self.getVectorTables(schema)
File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\gpkg\connector.py", line 362, in getVectorTables
geomname,
UnboundLocalError: local variable 'geomname' referenced before assignment
</pre>

Back