06-17-2024, 06:30 PM | #1 |
Enthusiast
Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
|
database API set_field not working
I am trying to edit a field such as the title field for a book through the python API so I am using the calibre-debug.exe to do it.
I do db.set_field("title", 18168) and tried db.set_field("title", [18168]) but it says AttributeError: 'list' object has no attribute 'items'. I look at the documentation and it doesn't even list an example and find it quite hard to understand it compared to other API documentations I've seen. here is what it says set_field(name, book_id_to_val_map, allow_case_change=True, do_path_update=True) I set the field name of "title" and passed the book id in a list. So I don't understand what I am doing wrong. Any ideas? |
06-17-2024, 06:42 PM | #2 |
Enthusiast
Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
|
well nvm found out how to do it by using chatgpt
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Database Restore not working | iondream | Calibre | 9 | 11-24-2023 01:08 AM |
How can I use the database API to get a collection of all known series? | charlweed | Development | 2 | 03-06-2023 05:44 PM |
Problems using Calibre 3.15.0 Database API | einnordlicht | Development | 2 | 01-06-2018 10:28 PM |
Arc Google maps api v2 is not working in kobo arc | Angel Shah | Kobo Tablets | 3 | 05-29-2013 12:27 PM |
Database ids when working with devices | kiwidude | Development | 1 | 06-20-2011 01:34 PM |