unable to connect my database correctly

0 votes
101 views
asked May 11, 2017 by Marc

Une erreur est survenue lors de l'éxécution du code Python:

TypeError: QTextEdit.append(QString): argument 1 has unexpected type 'OperationalError'

Traceback (most recent call last):
  File "D:/DATA/m.chantepie/.qgis2/python/plugins\rivergis\rivergis.py", line 268, in connChanged
    self.rdb.connect_pg()
  File "D:/DATA/m.chantepie/.qgis2/python/plugins\rivergis\river_database.py", line 81, in connect_pg
    self.rgis.addInfo(msg)
  File "D:/DATA/m.chantepie/.qgis2/python/plugins\rivergis\rivergis.py", line 195, in addInfo
    self.ui.textEdit.append(text)
TypeError: QTextEdit.append(QString): argument 1 has unexpected type 'OperationalError'


Version de Python : 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
Version de QGIS : 2.18.6 Las Palmas, 5f369b0

Chemin Python :

  • C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing
  • C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python
  • D:/DATA/m.chantepie/.qgis2/python
  • D:/DATA/m.chantepie/.qgis2/python/plugins
  • C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins
  • C:\PROGRA~1\QGIS2~1.18\bin\python27.zip
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\DLLs
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\plat-win
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\lib-tk
  • C:\PROGRA~1\QGIS2~1.18\bin
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\PIL
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32\lib
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Pythonwin
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\wx-2.8-msw-unicode
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg
  • C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg
  • D:/DATA/m.chantepie/.qgis2//python
  • D:/DATA/m.chantepie/Desktop/tutorial rivergis/BaldEagle_example

1 Answer

0 votes
answered May 18, 2017 by rpasiok (2,241 points)

Hi Marc,

Try to save your username and password in your PostgreSQL connection settings dialog, i.e.:

Welcome to RiverGIS Q&A, where you can ask questions and receive answers from other members of the community.

Visit rivergis.com for documentation and general info about the QGIS plugin.
...