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

Search is no longer functional with geopackage .gpkg #95

Open
Martin-GUILLOU opened this issue Sep 21, 2023 · 5 comments
Open

Search is no longer functional with geopackage .gpkg #95

Martin-GUILLOU opened this issue Sep 21, 2023 · 5 comments

Comments

@Martin-GUILLOU
Copy link

Since version 2.5.8 the search is no longer functional with data stored in geopackage .gpkg.
No error message, the search just returns no results.
The configuration window finds the desired data and fields.
A downgrade to v.2.5.7 is necessary on my side.

QGIS version 3.28.10-Firenze

Desktop OS win 10 pro

Datastore samba Debian

@DarrenFennell
Copy link

I can second this. I was using this plugin to provide offline address search capability, it used to work great but no longer seems to function despite the config reading the gpkg file, tables and data columns correctly.

QGIS version 3.28.10-Firenze
Desktop OS win 10 enterprise
Datastore OS AddressBase Plus in gpkg format

@jctull
Copy link
Contributor

jctull commented Jun 25, 2024

This has been an issue for some time for me as well. When attempting to use the plugin, I receive a warning, "WARNING Cannot find layer .()" and no items are found. Layers show up in the configuration window when setting up the connection for gpkg files.

Currently running:
QGIS 3.38.0
MacOS Conda ARM package

@kannes
Copy link

kannes commented Jan 29, 2025

I have a working fix, after testing I will make a PR.

If you want it now, in discoveryplugin.py change

    if db is None:
        return

to

    if db is None and self.data_type != "gpkg":
        return

kannes pushed a commit to kannes/qgis-discovery-plugin that referenced this issue Jan 29, 2025
@OpenSourceMapping
Copy link

I have amended as suggested but get an error message when running a search on a gpkg layer:

WARNING Traceback (most recent call last):
File "C:\Users/[username]/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Discovery\discoveryplugin.py", line 376, in on_result_selected
self.select_result(self.search_results[result_index.row()])
File "C:\Users/[username]/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Discovery\discoveryplugin.py", line 383, in select_result
transform = QgsCoordinateTransform(QgsCoordinateReferenceSystem.fromEpsgId(src_epsg),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: QgsCoordinateReferenceSystem.fromEpsgId(): argument 1 has unexpected type 'str'

@kannes
Copy link

kannes commented Jan 31, 2025

I have that fixed too in my branch :) Just waiting for feedback from my client for potential more breakage. Probably some time next week.

The fix for this is changing fromEpsgId to fromOgcWmsCrs.

master...kannes:qgis-discovery-plugin:fix_crs_format

Iirc that was all I fixed so far.

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

5 participants