An error message from the Editor ...
Code:
calibre, version 5.99.0
ERROR: Unhandled exception: <b>TypeError</b>:int() argument must be a string, a bytes-like object or a real number, not 'KeyboardModifier'
calibre 5.99 Portable embedded-python: True
Windows-10-10.0.19042 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19042')
Python 3.10.1
Windows: ('10', '10.0.19042', '', 'Multiprocessor Free')
Interface language: en_GB
Successfully initialized third party plugins: EpubCheck (0, 2, 3) && EpubMetadata (0, 0, 6) && EpubXCustomMetadata (0, 0, 7) && JS_Editor_Tools (0, 3, 16) && JS_Editor_Utils (0, 0, 9) && JS_Modify_Epub (0, 0, 22) && KoboTouchExtended (3, 5, 4) && ScrambleEbook (0, 5, 0) && Smart_Device_App_CSSAdd (0, 0, 12) && TTS to MP3 (0, 5, 10)
Traceback (most recent call last):
File "calibre\gui2\tweak_book\editor\text.py", line 950, in keyPressEvent
File "calibre\gui2\tweak_book\editor\smarts\html.py", line 738, in handle_key_press
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'KeyboardModifier'
I'm not 100% sure of the rules to make this happen but here's an example where it did.
If the html is:
Code:
<p class="noindent">First paragraph.</p>
<p class="indent">Second paragraph.</p>
To trigger the error, double-click
noindent to select it, then try to manually type
indent. The error happens as I try to type the last 't'.
Changing classname via copy/paste doesn't trigger the error. Neither does changing
noindent to
indent by manually deleting the first 2 chars with the [Delete] key or the [Backspace] key.