Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: JSONDecodeError when syncing sidecar back from calibre to the device #65

Open
burneracc0112 opened this issue Dec 19, 2024 · 0 comments
Assignees
Labels
bug Something isn't working triage needs attention

Comments

@burneracc0112
Copy link

KOreader Sync plugin version

0.6.8

KOreader version

2024.11

Operating System

Linux

Connection type

Wireless (over wifi)

Describe the bug

(OS - MacOS, Connection Type - Folder over SSH)

Sidecar is failing to sync back from calibre to koreader

How to reproduce

Sync sidecar from koreader to calibre
Delete folder sidecar on koreader
Attempt to sync from calibre to koreader

Expected behavior

Expected - Successful syncing of data

Provide details output from plugin pop-up window

calibre, version 7.22.0
ERROR: Unhandled exception: <b>JSONDecodeError</b>:Expecting value: line 1 column 1 (char 0)

calibre 7.22  embedded-python: True
macOS-15.2-arm64-arm-64bit Darwin ('64bit', '')
('Darwin', '24.2.0', 'Darwin Kernel Version 24.2.0: Fri Dec  6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000')
Python 3.11.5
OSX: ('15.2', ('', '', ''), 'arm64')
Interface language: None
EXE path: /Applications/calibre.app/Contents/MacOS/calibre
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 18, 0) && DeDRM (10, 0, 3) && Package KFX (from KFX Input) (2, 18, 0) && Count Pages (1, 13, 6) && EpubMerge (3, 2, 0) && FanFicFare (4, 40, 0) && KFX metadata reader (from KFX Input) (2, 18, 0) && From KFX (2, 18, 0) && KFX Input (2, 18, 0) && KOReader Sync (0, 6, 8) && Kindle Collections (1, 7, 29)
Traceback (most recent call last):
  File "calibre_plugins.koreader.action", line 692, in sync_missing_sidecars_to_koreader
    result, details = self.push_metadata_to_koreader_sidecar(book_uuid,
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.koreader.action", line 612, in push_metadata_to_koreader_sidecar
    sidecar_dict = json.loads(sidecar_metadata)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "json/__init__.py", line 346, in loads
  File "json/decoder.py", line 337, in decode
  File "json/decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Screenshots

No response

Any additional info

sidecar json

{
"annotations": {},
"cache_file_path": "./cache/cr3cache/_-_Lie_With_Me.epub.0289130c.1.cr3",
"config_panel_index": 1,
"copt_b_page_margin": 15,
"copt_block_rendering_mode": 3,
"copt_cjk_width_scaling": 100,
"copt_embedded_css": 1,
"copt_embedded_fonts": 1,
"copt_font_base_weight": 0,
"copt_font_gamma": 15,
"copt_font_hinting": 2,
"copt_font_kerning": 3,
"copt_font_size": 22,
"copt_h_page_margins": {
"1": 10,
"2": 10
},
"copt_line_spacing": 100,
"copt_nightmode_images": 1,
"copt_render_dpi": 96,
"copt_rotation_mode": 0,
"copt_smooth_scaling": 0,
"copt_status_line": 1,
"copt_sync_t_b_page_margins": 0,
"copt_t_page_margin": 15,
"copt_view_mode": 0,
"copt_visible_pages": 1,
"copt_word_expansion": 0,
"copt_word_spacing": {
"1": 95,
"2": 75
},
"cre_dom_version": 20240114,
"css": "./data/epub.css",
"doc_pages": 142,
"doc_path": "/mnt/us/books/# - Lie With Me.epub",
"doc_props": {
"authors": "Philippe Jacques Besson",
"description": "THE #1 FRENCH BESTSELLER

\"Stunning and heart-gripping.\" —André Aciman, author of Call Me By Your Name

The award-winning, bestselling French novel by Philippe Besson—\"the French Brokeback Mountain\" (Elle)—about an affair between two teenage boys in 1984 France, translated with subtle beauty and haunting lyricism by the iconic and internationally acclaimed actress/writer Molly Ringwald. 
We drive at high speed along back roads, through woods, vineyards, and oat fields. The bike smells like gasoline and makes a lot of noise, and sometimes I'm frightened when the wheels slip on the gravel on the dirt road, but the only thing that matters is that I'm holding on to him, that I'm holding on to him outside.

Just outside a hotel in Bordeaux, Philippe chances upon a young man who bears a striking resemblance to his first love. What follows is a look back at the relationship he's...",
"identifiers": "uuid:a9f3b345-fad6-4475-9e98-5939d79ff708\\\ncalibre:a97659c6-fea7-4947-955b-4b1bb50cd475\\\nISBN:9781501197895",
"language": "en",
"title": "Lie With Me"
},
"floating_punctuation": 0,
"font_face": "Noto Serif",
"font_family_fonts": {},
"handmade_flows_edit_enabled": true,
"handmade_flows_enabled": false,
"handmade_toc_edit_enabled": true,
"handmade_toc_enabled": false,
"hide_nonlinear_flows": false,
"highlight_color": "gray",
"highlight_drawer": "lighten",
"hyph_force_algorithmic": false,
"hyph_soft_hyphens_only": false,
"hyph_trust_soft_hyphens": false,
"hyphenation": true,
"inverse_reading_order": false,
"last_xpointer": "/body/DocFragment[1]/body/div/svg.0",
"page_overlap_style": "dim",
"partial_md5_checksum": "d895efb28b6891e75fd8ac533d896836",
"partial_rerendering": true,
"percent_finished": 0.0070422535211268,
"preferred_dictionaries": {},
"readermenu_tab_index": 7,
"show_overlap_enable": false,
"stats": {
"authors": "Philippe Jacques Besson",
"highlights": 0,
"language": "en",
"notes": 0,
"pages": 142,
"performance_in_pages": {},
"series": "N/A",
"title": "Lie With Me"
},
"summary": {
"modified": "2024-12-19",
"status": "reading"
},
"text_lang": "en-US",
"text_lang_embedded_langs": true,
"toc_ticks_ignored_levels": {}
}
@burneracc0112 burneracc0112 added bug Something isn't working triage needs attention labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage needs attention
Projects
None yet
Development

No branches or pull requests

2 participants