Skip to content

Missing Bookmarks #16

Description

@jalcine

Not sure where or how this is happening, but I run into this error when I attempt to sync my bookmarks:

calibre, version 6.13.0
ERROR: Unhandled exception: <b>AttributeError</b>:'list' object has no attribute 'values'

calibre 6.13  embedded-python: False
Linux-6.1.0-11-amd64-x86_64-with-glibc2.36 Linux ('64bit', 'ELF')
('Linux', '6.1.0-11-amd64', '#1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4 (2023-08-08)')
Python 3.11.2
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 5, 0) && Package KFX (from KFX Input) (2, 5, 0) && ACE (1, 1, 6) && Annotations (1, 17, 13) && Audio M3U (1, 0, 0) && AudioBook_Duration (1, 0, 9) && Audit Log (1, 0, 19) && Barnes & Noble (1, 5, 2) && Check Books (0, 1, 8) && Count Pages (1, 13, 2) && Embed Comic Metadata (1, 6, 6) && FanFicFare (4, 27, 0) && Fantastic Fiction (1, 6, 4) && Find Duplicates (1, 10, 8) && Goodreads (1, 7, 9) && Goodreads Sync (1, 16, 3) && Goodreads_Rating (4, 0, 0) && Import List (1, 9, 1) && KFX metadata reader (from KFX Input) (2, 5, 0) && KFX Input (2, 5, 0) && KOReader Sync (0, 5, 2) && Kobo Books (1, 9, 2) && Kobo Utilities (2, 16, 10) && KoboTouchExtended (3, 6, 6) && Library Codes (1, 0, 65) && LibraryThing Match (0, 2, 2) && OverDrive Libby (0, 1, 9) && Overdrive Link (2, 56, 0) && Prettify Cover (1, 6, 0) && Quality Check (1, 13, 6) && Reading List (1, 15, 1) && Search The Internet (1, 10, 1) && Similar Stories (1, 0, 58) && Standard Ebooks (1, 0, 0) && Wiki Reader (2, 2, 1) && WordDumb (3, 29, 6) && ePub Extended Metadata {Writer} (0, 10, 2) && ePub Extended Metadata {Reader} (0, 10, 2) && ePub Extended Metadata (0, 10, 2) && Overdrive Link Metadata Source (2, 56, 0)
Traceback (most recent call last):
  File "calibre_plugins.koreader.action", line 707, in sync_to_calibre
    sidecar_contents = self.get_sidecar(device, sidecar_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.koreader.action", line 289, in get_sidecar
    parsed_contents = self.parse_sidecar_lua(decoded_contents)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.koreader.action", line 326, in parse_sidecar_lua
    for bookmark in decoded_lua['bookmarks'].values()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'values'

I can assume that there's some kind of mismatch happening here https://github.com/harmtemolder/koreader-calibre-plugin/blob/main/action.py#L319-L327 (is it possible that it's getting back a null value but the key itself exists).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions