Bug report #18986

Processing "Import vector into PostGIS database" error when using a connection with autentication

Added by Luca Lanteri about 2 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Processing/GDAL
Affected QGIS version:3.1(master) Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:26817

Description

- Set a connection to postgres using Autentication metod.
- Try to import a vector using processing alg "Import vector into PostGIS database"

QGIS 2.18.18 return this error:
- global name 'os' is not defined See log for more details

QGIS 3.01 return this error:
2018-05-18T14:18:11 WARNING Traceback (most recent call last):
File "C:/OSGEO4~2/apps/qgis-dev/./python/plugins\processing\gui\wrappers_postgis.py", line 102, in connectionChanged
self.setConnection(connection)
File "C:/OSGEO4~2/apps/qgis-dev/./python/plugins\processing\gui\wrappers_postgis.py", line 108, in setConnection
self._database = GeoDB.from_name(connection)
File "C:/OSGEO4~2/apps/qgis-dev/./python/plugins\processing\tools\postgis.py", line 170, in from_name
return cls(uri=uri)
File "C:/OSGEO4~2/apps/qgis-dev/./python/plugins\processing\tools\postgis.py", line 232, in init
os.remove(sslCAFile)
PermissionError: [WinError 5] Accesso negato: 'C:/Users/lucalant/AppData/Local/Temp/tmp_basic_{4c101150-2bc7-499b-895b-c6efae392a37}.pem'

Also available in: Atom PDF