Deprecated: Function get_magic_quotes_gpc() is deprecated in /qa-include/qa-base.php on line 1170

Warning: session_start(): Cannot start session when headers already sent in /qa-include/app/users.php on line 162

Warning: Cannot modify header information - headers already sent by (output started at /qa-include/qa-base.php:1170) in /qa-include/app/users.php on line 1282

Notice: Trying to access array offset on value of type null in /qa-include/pages/question-view.php on line 1131

Notice: Trying to access array offset on value of type null in /qa-include/pages/question-view.php on line 1131

Notice: Trying to access array offset on value of type null in /qa-include/pages/question-view.php on line 1131

Warning: Cannot modify header information - headers already sent by (output started at /qa-include/qa-base.php:1170) in /qa-include/app/page.php on line 356
Problem with DB Connection - RiverGIS Q&A
Recently we get enormous amount of spam registration. We have closed the registration for new members, sorry...
0 votes
2.7k views
by
I use PostgreSQL database (postgresql-9.4.6-1-windows-x64.exe) with PostGIS spatial extensions (postgis-bundle-pg94x64-setup-2.2.0-1.exe) and in QGIS 2.8.7 the test connection with the rivergis database is successful.
When I set in RiverGis the DB Connection "rivergis@localhost" appear the message: "Can't connect to PostGis database", An error has occurred while executing Python code:

Traceback (most recent call last):
  File "C:/Users/f.galli/.qgis2/python/plugins\rivergis\rivergis.py", line 268, in connChanged
    self.rdb.connect_pg()
  File "C:/Users/f.galli/.qgis2/python/plugins\rivergis\river_database.py", line 81, in connect_pg
    self.rgis.addInfo(msg)
  File "C:/Users/f.galli/.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.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

QGIS version:
2.8.7-Wien Wien, 8a47921

Python path: ['C:/Users/f.galli/.qgis2/python/plugins\\processing', 'C:/Users/f.galli/.qgis2/python/plugins\\postgis_geoprocessing', 'C:/PROGRA~1/QGISWI~1/apps/qgis-ltr/./python', u'C:/Users/f.galli/.qgis2/python', u'C:/Users/f.galli/.qgis2/python/plugins', 'C:/PROGRA~1/QGISWI~1/apps/qgis-ltr/./python/plugins', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\matplotlib-1.3.1-py2.7-win-amd64.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\nose-1.3.3-py2.7.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\tornado-4.0.1-py2.7-win-amd64.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\backports.ssl_match_hostname-3.4.0.2-py2.7.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\certifi-14.05.14-py2.7.egg', 'c:\\osgeo4~1\\apps\\python27\\lib\\site-packages\\python_dateutil-2.1-py2.7.egg', 'C:\\PROGRA~1\\QGISWI~1\\bin\\python27.zip', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\DLLs', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\plat-win', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\lib-tk', 'C:\\PROGRA~1\\QGISWI~1\\bin', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\PIL', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\jinja2-2.7.2-py2.7.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\markupsafe-0.23-py2.7-win-amd64.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\pytz-2012j-py2.7.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\win32', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\six-1.10.0-py2.7.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\xlrd-0.9.2-py2.7.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\xlwt-0.7.5-py2.7.egg', u'C:/Users/f.galli/.qgis2//python', 'C:\\Users\\f.galli\\.qgis2\\python\\plugins\\DigitizingTools\\tools', 'C:\\Users\\f.galli\\.qgis2\\python\\plugins\\mmqgis/forms', 'C:\\Users\\f.galli\\.qgis2\\python\\plugins\\QuickMultiAttributeEdit/forms', 'C:\\PROGRA~1\\QGISWI~1\\apps\\qgis-ltr\\python\\plugins\\fTools\\tools']

Best regards

2 Answers

0 votes
by
Did you checked "Save" checkboxes for login and password during creating PostGIS connection in QGIS? If not - please check them and try to connect via RiverGIS again.
by
Yes I checked them but the error appears again.
by
From error log I can say that some of connection parameters are not valid, so RiverGIS can't connect. Are you able to connect to database and schema via DB Manager?
by
Via DB Manager the connection is successful.
by
Hmm... This is getting strange. Maybe try to create a new user in pgAdmin and new database with it. Then make new PostGIS connection with new user credentials and try to connect via RiverGIS again.
by
Ok the problem was a conflict with the name of the connection.
Thank you
by
I'm glad that you manage to solve a problem. :)
by
"Ok the problem was a conflict with the name of the connection."

Can you specify? I ve the same problem but cant figure out what fixed it for you.
0 votes
by

yeah, thanks a lot. I activated the checkboxes username and password and it worked out for me:

by
Activando Save Username y Save Password, funciona muy bien
by
thank you, very sim ple
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.

Categories

...