Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostGIS connection with service #38

Open
tschuettenberg opened this issue Oct 30, 2019 · 0 comments
Open

PostGIS connection with service #38

tschuettenberg opened this issue Oct 30, 2019 · 0 comments

Comments

@tschuettenberg
Copy link

First, this plugin is the perfekt completion to QGIS when deployed across a whole organisation with centralised data! Thanks for that!

But it seems that PostGIS connections, that are configured as service (pg_service.conf) and therefore every other field of the connection parameters remains empty, are not respected by the Plugin. I also use this in combination with the authentication.
If choosing such a (otherwise working) connection I get the following python error:

Traceback (most recent call last):
  File "C:\Users\b4406621\AppData\Roaming\QGIS\geoservice\qgis-ltr\profiles\default/python/plugins\LayerMetadataSearch\geo_cat_config_dialog.py", line 159, in on_connection_changed
    cur = self._get_cur()
  File "C:\Users\b4406621\AppData\Roaming\QGIS\geoservice\qgis-ltr\profiles\default/python/plugins\LayerMetadataSearch\geo_cat_config_dialog.py", line 173, in _get_cur
    ci = get_postgres_conn_info(self.postGisConnectionComboBox.currentText())
  File "C:\Users\b4406621\AppData\Roaming\QGIS\geoservice\qgis-ltr\profiles\default/python/plugins\LayerMetadataSearch\dbutils.py", line 67, in get_postgres_conn_info
    conn_info["port"] = settings.value("port", 5432, type=int)
TypeError: unable to convert a QVariant of type 10 to a QMetaType of type 2

When retrying I only get "Can not connect to database. Please check connection."
Because of the unavoidable(?) default port 5432 in the connection parameters dialog the plugin seems to recognise (only) an incomplete connection in this case?

How is it possible to use a postgres service connection within the Layer Metadata Serach Configuartion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant