View Single Post
Old Yesterday, 06:00 AM   #1
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,332
Karma: 16800000
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
[Editor] Possible bug in run_text_search function?

I have a personal calibre Editor plugin containing many Tools which I have used for many years. A recent calibre update (earlier than 9.13 but not much earlier) introduced an intermittent problem in one of my Tools.

This is the traceback from the error log when I'm trying to use the Editor's self.boss.find_text(...) method:
Code:
Traceback (most recent call last):
  File "calibre_plugins.js_editor_tools_plugin.main", line 1280, in fragment_doubleclicked
  File "calibre\gui2\tweak_book\boss.py", line 1340, in find_text
  File "calibre\gui2\tweak_book\text_search.py", line 197, in run_text_search
  File "calibre\gui2\tweak_book\editor\widget.py", line 454, in find_text
TypeError: TextEdit.find_text() got an unexpected keyword argument 'wrap'
The failing code is in the run_text_search function:
Code:
if not files and editor.find_text(pat, wrap=True):
I've managed to change my Tool code to avoid this error but I'm posting here because, although I'm not 100% sure, I do think it may be a bug.
jackie_w is offline   Reply With Quote