Bug report #18304

Updated by Giovanni Manghi over 3 years ago

*New description:*

Importing vectors to PostGIS in DB Manager fails in QGIS 3 with a python error. The same error show also when clicking on the "update" button in the import dialog. Moreover seems that the source/target CRS parameters are not filled as they are in QGIS 2.18

Traceback (most recent call last):
File "C:/OSGEO4~1/apps/qgis/./python/plugins\db_manager\dlg_import_vector.py", line 200, in updateInputLayer
if not self.reloadInputLayer() or not self.inLayer:
File "C:/OSGEO4~1/apps/qgis/./python/plugins\db_manager\dlg_import_vector.py", line 196, in reloadInputLayer
self.checkSupports()
File "C:/OSGEO4~1/apps/qgis/./python/plugins\db_manager\dlg_import_vector.py", line 103, in checkSupports
self.chkGeomColumn.setEnabled(allowSpatial and hasGeomType)
TypeError: setEnabled(self, bool): argument 1 has unexpected type 'QgsVectorLayer'

*Old description:*
Bug in QGis 3.0.0 when trying to import a line vector layer(shp) to postgis database

To reproduce:
1)create a vector layer(shp), geometry type= line
2)connect to postgis database
3)import vector layer to postgis database (check create spatial index)

The message error is this
in DlgImportVector.checkSupports()

setEnabled(self, bool): argument 1 has unexpected type 'QgsVectorLayer'

Back