Quote:
Originally Posted by nqk
Dear @capink,
I'm now using "Selection Modifier" to search
Search: New search
Search option: Select all book in current view (or another option)
If the search finds something, the action continues well. But if it finds nothing an error shows up
Code:
File "calibre\db\view.py", line 226, in index_to_id
IndexError: tuple index out of range
Since I plan to use this with "Timer" event, there will be a tons of error messages like this... because at the end of the action chain, some tags will be removed and it will affect the search result when the action chain is triggered again.
|
This does not happen to me. I checked and the plugin makes sure the current view contains books before making any selections.
I need the full log to see what part in Action Chains is causing this. The log you provided only shows what happens after the plugin calls the relevant parts of calibre.
Also a couple of things:
- If your chains does not make use of "Calibre Actions" action, it is better to use scopes instead of selection modifier.
- It is better to use the custom Add Books action instead of relying on the Books Added events. You place the custom add action at the top of your chain and follow it with other actions you want to perform on added books. You can assign this add chain any shortcut you want (override calibre default add shortcut if you want).
The only scenario where you might need the Books Added event, is to handle auto-added books.