Bug report #18231
Updated by Jürgen Fischer about 6 years ago
DB Manager cannot access PostgreSQl resources if it's configured with Converted Config Seg option.
When trying to expand schemas it returns error
Error message:
> Erro Python: Um erro ocorreu enquanto executava o código Python: Consulte o registro de mensagens (Erro Python) para mais detalhes.
Python error:
<pre>
> Um erro ocorreu enquanto executava o código Python:
>
> PermissionError: [WinError 5] Access is denied: 'C:/Users/arjesus/AppData/Local/Temp/tmp_basic_{147fc7e0-e22a-4797-b33f-8b054b7af54b}.pem'
> Traceback (most recent call last):
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_model.py", line 441, in rowCount
> self._refreshIndex(parent, True)
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_model.py", line 490, in _refreshIndex
> if item.populate():
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_model.py", line 167, in populate
> if not connection.connect():
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 103, in connect
> return self.connectToUri(uri)
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\plugin.py", line 109, in connectToUri
> self.db = self.databasesFactory(self, uri)
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 70, in databasesFactory
> return PGDatabase(connection, uri)
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 111, in __init__
> Database.__init__(self, connection, uri)
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\plugin.py", line 218, in __init__
> self.connector = self.connectorsFactory(uri)
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 114, in connectorsFactory
> return PostGisDBConnector(uri)
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\connector.py", line 128, in __init__
> os.remove(sslCAFile)
> PermissionError: [WinError 5] Access is denied: 'C:/Users/arjesus/AppData/Local/Temp/tmp_basic_{147fc7e0-e22a-4797-b33f-8b054b7af54b}.pem'
>
>
> Versão do Python: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)]
> Versão do QGIS: 3.0.0-Girona Girona, 001c80b0c3
>
> Caminho do Python:
> C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python
> C:/Users/arjesus/AppData/Roaming/QGIS/QGIS3\profiles\default/python
> C:/Users/arjesus/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
> C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins
> C:\Program Files\QGIS 3.0\bin\python36.zip
> C:\PROGRA~1\QGIS3~1.0\apps\Python36\DLLs
> C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib
> C:\Program Files\QGIS 3.0\bin
> C:\PROGRA~1\QGIS3~1.0\apps\Python36
> C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages
> C:/Users/arjesus/AppData/Roaming/QGIS/QGIS3\profiles\default/python
----------
> Access is denied: 'C:/Users/arjesus/AppData/Local/Temp/tmp_basic_{147fc7e0-e22a-4797-b33f-8b054b7af54b}.pem'
</pre>
File permission is ok for my user, i don't know why it returns denied access.
Using default basic authentication works.
When trying to expand schemas it returns error
Error message:
> Erro Python: Um erro ocorreu enquanto executava o código Python: Consulte o registro de mensagens (Erro Python) para mais detalhes.
Python error:
<pre>
> Um erro ocorreu enquanto executava o código Python:
>
> PermissionError: [WinError 5] Access is denied: 'C:/Users/arjesus/AppData/Local/Temp/tmp_basic_{147fc7e0-e22a-4797-b33f-8b054b7af54b}.pem'
> Traceback (most recent call last):
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_model.py", line 441, in rowCount
> self._refreshIndex(parent, True)
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_model.py", line 490, in _refreshIndex
> if item.populate():
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_model.py", line 167, in populate
> if not connection.connect():
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 103, in connect
> return self.connectToUri(uri)
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\plugin.py", line 109, in connectToUri
> self.db = self.databasesFactory(self, uri)
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 70, in databasesFactory
> return PGDatabase(connection, uri)
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 111, in __init__
> Database.__init__(self, connection, uri)
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\plugin.py", line 218, in __init__
> self.connector = self.connectorsFactory(uri)
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 114, in connectorsFactory
> return PostGisDBConnector(uri)
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\connector.py", line 128, in __init__
> os.remove(sslCAFile)
> PermissionError: [WinError 5] Access is denied: 'C:/Users/arjesus/AppData/Local/Temp/tmp_basic_{147fc7e0-e22a-4797-b33f-8b054b7af54b}.pem'
>
>
> Versão do Python: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)]
> Versão do QGIS: 3.0.0-Girona Girona, 001c80b0c3
>
> Caminho do Python:
> C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python
> C:/Users/arjesus/AppData/Roaming/QGIS/QGIS3\profiles\default/python
> C:/Users/arjesus/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
> C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins
> C:\Program Files\QGIS 3.0\bin\python36.zip
> C:\PROGRA~1\QGIS3~1.0\apps\Python36\DLLs
> C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib
> C:\Program Files\QGIS 3.0\bin
> C:\PROGRA~1\QGIS3~1.0\apps\Python36
> C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages
> C:/Users/arjesus/AppData/Roaming/QGIS/QGIS3\profiles\default/python
----------
> Access is denied: 'C:/Users/arjesus/AppData/Local/Temp/tmp_basic_{147fc7e0-e22a-4797-b33f-8b054b7af54b}.pem'
</pre>
File permission is ok for my user, i don't know why it returns denied access.
Using default basic authentication works.