Search with tags

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

Bug Description

Hi Kovid,
I found some issues where the new search (with tags) in the editor will not find repeatable a word or word groups in a terrible testing file. The file is protected with PW. I will send you the PW per PM

Search for bärin.
It should find it in theses lines with the editor:
627, 629, 633, 639, 641, 643, 649, 673, 689, 697, 1131, 1433

If you do a search for "die bärin", it will be find only one time and not repeatable. Case sensitive is off.
Found in 629, 673, 697 but not in 627, 633, 641, 643, 649 (two times, one as "Die bärin" and one as "<span class="text_34"></span>Die<span class="text_34"></span>bärin<span class="text_34"></span>")

It seems that especially in this file repeatable searches have a problem. After I had done a beautify HTML the search find more then one occurrence, but never all occurrences. Equal if it is a word or a word group like "die bärin"

Best regards,
Armin

description: updated
Revision history for this message
Armin Geller (armingeller) wrote :
Revision history for this message
Kovid Goyal (kovid) wrote :

Note that atleast some of the instance you quote are not matches because there is no space between Die and barin, for example Die<span class="text_2"></span>bärin<span class="text_2">

However, there is indeed a bug that affects finding multiple matches in the same file.

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

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

 status fixreleased

Changed in calibre:
status: New → Fix Released
Revision history for this message
Armin Geller (armingeller) wrote :

Ups yes, sorry for not seen that directly. Thanks for the update.

I updated the source and run it via VS from source with the same file. Now it seems that the search engine will find the words but then (at maybe the end of the last finding?) there came up an error and then you can not go further with searching:

-------------------------------------
calibre, version 2.58.0
ERROR: Unhandled exception: <b>AttributeError</b>:'NoneType' object has no attribute 'is_start'

calibre 2.58* [64bit] embedded-python: True is64bit: True
Windows-8-6.2.9200 Windows ('64bit', 'WindowsPE')
('Windows', '8', '6.2.9200')
Python 2.7.9
Windows: ('8', '6.2.9200', '', 'Multiprocessor Free')
Successfully initialized third party plugins: DeDRM && Modify ePub && Goodreads Sync && Annotations && Extract ISBN && KoboTouchExtended && BOL_DE && Manage Sony x50 Reader Book List && Favourites Menu && Goodreads && Library Codes && Count Pages && EpubMerge && Job Spy && Open With && Quality Check && ScrambleEbook && Import List && food network Recipe Reader && Wiki Reader && Diaps Editing Toolbag && EpubSplit && Generate Cover && KindleUnpack - The Plugin && Search The Internet && Find Duplicates
Traceback (most recent call last):
  File "c:\Users\Armin\git\calibre\src\calibre\gui2\tweak_book\boss.py", line 924, in find_text
  File "c:\Users\Armin\git\calibre\src\calibre\gui2\tweak_book\text_search.py", line 164, in run_text_search
  File "c:\Users\Armin\git\calibre\src\calibre\gui2\tweak_book\editor\widget.py", line 290, in find_text
  File "c:\Users\Armin\git\calibre\src\calibre\gui2\tweak_book\editor\text.py", line 384, in find_text
  File "c:\Users\Armin\git\calibre\src\calibre\gui2\tweak_book\editor\smarts\html.py", line 684, in find_text
  File "c:\Users\Armin\git\calibre\src\calibre\gui2\tweak_book\editor\smarts\html.py", line 119, in find_tag_definition
AttributeError: 'NoneType' object has no attribute 'is_start'

----------------------------------------------

Is this a problem with running it from source?

A additional question: Is it normal that I need to check the option "dot all" with a normal search?

What I miss is an option wrap around for this search. Guess, this would be a benefit I recognize in my test :)

Once more thanks a lot,

Armin

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1588778

Should be fine now.

Revision history for this message
Armin Geller (armingeller) wrote :

Yes and it is wrapping around. :)

Thanks & best regards,
Armin

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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