erpas / rgis

RiverGIS is a QGIS plugin for creating HEC-RAS flow model geometry from spatial data. The functionality is similar to that of HEC-GeoRAS
http://rivergis.com
50 stars 14 forks source link

BUG: User wrong connection configuration #24

Closed vicente-medina closed 6 years ago

vicente-medina commented 8 years ago

It is not a RiverGIS bug, in my opinion it is an exception management issue:

In the RiverGIS form, if a PG connection without the username/password properly defined is selected by the user, it triggers python error:

An error has occurred while executing Python code:

TypeError: QTextEdit.append(QString): argument 1 has unexpected type 'OperationalError' Traceback (most recent call last): File "C:/Users/tt/.qgis2/python/plugins\rivergis\rivergis.py", line 268, in connChanged self.rdb.connect_pg() File "C:/Users/tt/.qgis2/python/plugins\rivergis\river_database.py", line 81, in connect_pg self.rgis.addInfo(msg) File "C:/Users/tt/.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'

Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] QGIS version: 2.16.1-Nødebo Nødebo, 8545b3b

erpas commented 6 years ago

Fixed in version 3.