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

Unable to update: "UnicodeEncodeError: Error Synchronizing data" #2

Open
Hiallthejetbrains opened this issue Nov 8, 2024 · 1 comment

Comments

@Hiallthejetbrains
Copy link

After installing and adding token gathered from Libby to the config document, this error occurs whenever I attempt to open the plugin page.

calibre, version 7.20.0
ERROR: Unhandled exception: <b>UnicodeEncodeError</b>: Error synchronizing data

calibre 7.20  embedded-python: True
Python 3.11.5
Interface language: None
EXE path: /Users/--/Applications/calibre.app/Contents/MacOS/calibre
Successfully initialized third party plugins: DeACSM (0, 0, 16) && Gather KFX-ZIP (from KFX Input) (2, 16, 0) && DeDRM (10, 0, 3) && Package KFX (from KFX Input) (2, 16, 0) && KFX metadata reader (from KFX Input) (2, 16, 0) && From KFX (2, 16, 0) && KFX Input (2, 16, 0) && Modify ePub (1, 8, 5) && OverDrive Libby (0, 2, 2)
Traceback (most recent call last):
  File "calibre_plugins.overdrive_libby.workers", line 351, in run
    synced_state = libby_client.sync()
                   ^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.overdrive_libby.libby.client", line 631, in sync
    res: Dict = self.send_request("chip/sync")
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.overdrive_libby.libby.client", line 518, in send_request
    response = req_opener.open(req, timeout=self.timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urllib/request.py", line 519, in open
  File "urllib/request.py", line 536, in _open
  File "urllib/request.py", line 496, in _call_chain
  File "urllib/request.py", line 1391, in https_open
  File "urllib/request.py", line 1348, in do_open
  File "http/client.py", line 1286, in request
  File "http/client.py", line 1327, in _send_request
  File "http/client.py", line 1259, in putheader
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2026' in position 512: ordinal not in range(256)

@sgmoore
Copy link
Owner

sgmoore commented Nov 9, 2024

codec can't encode character '\u2026'

That character is … (i.e. a horizontal ellipsis aka the three dots) and usually occurs at the end of a string to indicate that part of the string has been truncated.

So I'm assuming you copied the token from your browser, but the browser did not show or copy the full token. If so, there should be an option to show the full token, either by double-clicking on it or perhaps a button to edit it.

The full token is several hundred characters long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants