4

I have had no success setting up the QuickFinder plugin in QGIS to search project layers. Once I select the checkbox "Search in project layers" in the settings and create a new QuickFinder file, it gives the following error when trying to create a search.

I had the same errors on a Win7 (QGIS 2.10.1) and Ubuntu machine (QGIS 2.8.1). I uninstall/reinstalled the plugin, and I also installed from the extracted zip file without any luck.

Any ideas how to get this plugin up and running on QGIS 2.10?

An error has occured while executing Python code:

Traceback (most recent call last): File "C:/Users/username/.qgis2/python/plugins\quickfinder\gui\projectsearchdialog.py", line 78, in process ok, message = self.projectFinder.recordSearch(self.projectSearch) File "C:/Users/username/.qgis2/python/plugins\quickfinder\core\projectfinder.py", line 230, in recordSearch self.deleteSearch(searchId, False) File "C:/Users/username/.qgis2/python/plugins\quickfinder\core\projectfinder.py", line 197, in deleteSearch cur.execute(sql) OperationalError: no such table: quickfinder_data

Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

QGIS version: 2.10.1-Pisa Pisa, d20c5b7

Python path: ['C:/Users/username/.qgis2/python/plugins\processing', 'C:/Users/username/.qgis2/python/plugins\postgis_geoprocessing', 'C:\Users\username\.qgis2\python\plugins\GeoCoding\libs', 'C:/PROGRA~1/QGISPI~1/apps/qgis/./python', u'C:/Users/username/.qgis2/python', u'C:/Users/username/.qgis2/python/plugins', 'C:/PROGRA~1/QGISPI~1/apps/qgis/./python/plugins', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\matplotlib-1.3.1-py2.7-win-amd64.egg', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\nose-1.3.3-py2.7.egg', 'C:\Users\username\.qgis2\python\plugins\opengeo\ext-libs\requests-2.0.1-py2.7.egg', 'C:\Users\username\.qgis2\python\plugins\opengeo\ext-libs\python_dateutil-2.2-py2.7.egg', 'C:\Users\username\.qgis2\python\plugins\opengeo\ext-libs\six-1.9.0-py2.7.egg', 'C:\Users\username\.qgis2\python\plugins\opengeo\ext-libs\lxml-3.3.5-py2.7-win32.egg', 'C:\Users\username\.qgis2\python\plugins\opengeo\ext-libs\gsimporter-0.2-py2.7.egg', 'C:\Users\username\.qgis2\python\plugins\opengeo\ext-libs\httplib2-0.9-py2.7.egg', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\tornado-4.0.1-py2.7-win-amd64.egg', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\backports.ssl_match_hostname-3.4.0.2-py2.7.egg', 'C:\PROGRA~1\QGISPI~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:\osgeo4~1\apps\python27\lib\site-packages\six-1.3.0-py2.7.egg', 'C:\PROGRA~1\QGISPI~1\bin\python27.zip', 'C:\PROGRA~1\QGISPI~1\apps\Python27\DLLs', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\plat-win', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\lib-tk', 'C:\PROGRA~1\QGISPI~1\bin', 'C:\PROGRA~1\QGISPI~1\apps\Python27', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\PIL', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\pytz-2012j-py2.7.egg', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\win32', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\win32\lib', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\Pythonwin', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\six-1.3.0-py2.7.egg', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg', 'C:\PROGRA~1\QGISPI~1\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg', u'C:/Users/username/.qgis2//python', 'C:\Users\username\.qgis2\python\plugins\opengeo\ext-libs', 'C:\Users\username\.qgis2\python\plugins', 'C:\PROGRA~1\QGISPI~1\apps\qgis\python\plugins\fTools\tools']

whyzar
12.1k23 gold badges41 silver badges72 bronze badges
asked Sep 28, 2015 at 14:40
2
  • How are your layers stored? I was under the impression it could only search through SpatiaLite database layers. Commented Sep 28, 2015 at 15:02
  • My understanding is that it indexes the layers to a SpatiaLite DB to speed up the search, but the layers can be any local layers. In my case I tried both shapefiles and PostGIS tables. Both attempts failed. Commented Sep 28, 2015 at 15:31

1 Answer 1

2

The error is OperationalError: no such table: quickfinder_data in the file projectfinder.py.
If you look at the Python source code, you discover that, when you create a SQLite Database, quickfinder_data is a Sqlite Virtual Table (file projectfinder.py)

def createFTSfile(filepath):
 conn = sqlite3.connect(filepath)
 sql = "CREATE TABLE quickfinder_info (key text,value text);"
 sql += "INSERT INTO quickfinder_info (key,value) VALUES ('scope','quickfinder');"
 sql += "INSERT INTO quickfinder_info (key,value) VALUES ('db_version','1.0');"
 sql += "CREATE TABLE quickfinder_toc (search_id text, search_name text, layer_id text, layer_name text, expression text, priority integer, srid text, date_evaluated text);"
 sql_unicode61 = sql + "CREATE VIRTUAL TABLE quickfinder_data USING fts4 (tokenize=unicode61 \"remove_diacritics=1\", search_id, content, x real, y real, wkb_geom text);"
 sql += "CREATE VIRTUAL TABLE quickfinder_data USING fts4 (search_id, content, x real, y real, wkb_geom text);"
 cur = conn.cursor()
 try:
 cur.executescript(sql_unicode61)
 except sqlite3.OperationalError:
 cur.executescript(sql)
 conn.close()

And that the connection to the database is closed (conn.close())

To use it, you need to first push the refresh button (to reopen the connection, Quickfinder does not automatically refresh) but look also at How to setup FTS3/FTS4 with python2.7 on Windows which may pose problems

answered Sep 29, 2015 at 17:08

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.