Undocumented cardinality search broken

Bug #771175 reported by Jan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

I while ago someone created the ability to make a search like "tags:#3" to find books with at least 3 tags. This search was never added to the manual so I don't know if it's officially available, but using it currently gives me

"calibre, version 0.7.57
ERROR: Unhandled exception: <b>UnboundLocalError</b>:local variable 'loc' referenced before assignment

Traceback (most recent call last):
  File "H:\calibreDEV\calibre\src\calibre\gui2\library\views.py", line 747, in search_proxy
  File "H:\calibreDEV\calibre\src\calibre\gui2\library\models.py", line 297, in search
  File "H:\calibreDEV\calibre\src\calibre\library\caches.py", line 775, in search
  File "H:\calibreDEV\calibre\src\calibre\library\caches.py", line 793, in search_getting_ids
  File "H:\calibreDEV\calibre\src\calibre\utils\search_query_parser.py", line 193, in parse
  File "H:\calibreDEV\calibre\src\calibre\utils\search_query_parser.py", line 204, in _parse
  File "H:\calibreDEV\calibre\src\calibre\utils\search_query_parser.py", line 212, in evaluate
  File "H:\calibreDEV\calibre\src\calibre\utils\search_query_parser.py", line 251, in evaluate_token
  File "H:\calibreDEV\calibre\src\calibre\utils\search_query_parser.py", line 255, in _get_matches
  File "H:\calibreDEV\calibre\src\calibre\library\caches.py", line 668, in get_matches
  File "H:\calibreDEV\calibre\src\calibre\library\caches.py", line 412, in get_numeric_matches
UnboundLocalError: local variable 'loc' referenced before assignment"

I would propose to either remove it completely or fix it and add it to the manual

Related branches

Revision history for this message
Charles Haley (cbhaley) wrote :

Fix submitted.

Changed in calibre:
status: New → Fix Committed
Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in lp:calibre

Fixed in branch lp:calibre. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.