libby-calibre-plugin icon indicating copy to clipboard operation
libby-calibre-plugin copied to clipboard

Error 403 in download

Open shhQuiet opened this issue 1 year ago • 2 comments

After configuring the plugin, I see the books I have on loan. Selecting one and clicking download results in the 403 error... Using plugin version 0.1.9.1

calibre, version 7.19.0
ERROR: Unhandled exception: <b>ClientForbiddenError</b>: Failed to download e-book<p>HTTP Error 403: Forbidden</p>

calibre 7.19  embedded-python: True
macOS-14.6.1-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '23.6.0', 'Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:00 PDT 2024; root:xnu-10063.141.2~1/RELEASE_X86_64')
Python 3.11.5
OSX: ('14.6.1', ('', '', ''), 'x86_64')
Interface language: None
EXE path: /Applications/calibre.app/Contents/MacOS/calibre
Successfully initialized third party plugins: DeACSM (0, 0, 16) && Gather KFX-ZIP (from KFX Input) (2, 15, 0) && DeDRM (10, 0, 3) && Package KFX (from KFX Input) (2, 15, 0) && KFX metadata reader (from KFX Input) (2, 15, 0) && From KFX (2, 15, 0) && KFX Input (2, 15, 0) && OverDrive Libby (0, 1, 9, 1) && Overdrive Link (2, 57, 0) && Overdrive Link Metadata Source (2, 57, 0)
Traceback (most recent call last):
  File "calibre_plugins.overdrive_libby.libby.client", line 520, in send_request
    response = req_opener.open(req, timeout=self.timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urllib/request.py", line 525, in open
  File "urllib/request.py", line 634, in http_response
  File "urllib/request.py", line 563, in error
  File "urllib/request.py", line 496, in _call_chain
  File "urllib/request.py", line 643, in http_error_default
urllib.error.HTTPError: HTTP Error 403: Forbidden

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "calibre/gui2/threaded_jobs.py", line 85, in start_work
  File "calibre_plugins.overdrive_libby.ebook_download", line 50, in __call__
    downloaded_filepath = self._custom_download(
                          ^^^^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.overdrive_libby.ebook_download", line 94, in _custom_download
    res_content = libby_client.fulfill_loan_file(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.overdrive_libby.libby.client", line 808, in fulfill_loan_file
    res: bytes = self.send_request(
                 ^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.overdrive_libby.libby.client", line 540, in send_request
    ErrorHandler.process(e, error_response)
  File "calibre_plugins.overdrive_libby.libby.errors", line 143, in process
    raise error_info["error"](
calibre_plugins.overdrive_libby.libby.errors.ClientForbiddenError: <calibre_plugins.overdrive_libby.libby.errors.ClientForbiddenError; http_status=403, msg='HTTP Error 403: Forbidden', error_response=' ''>

shhQuiet avatar Oct 02 '24 18:10 shhQuiet

Same observed issue; haven't done any debug diagnostics.

jamesrtnz avatar Oct 03 '24 06:10 jamesrtnz

Plugin has been broken for quite some time, found several fixes, but as of October 2 it has stopped working and no workaround for the time being. Please don't open new issues over & over but read existing issues. Developer has abandoned project for now. Let's hope he'll be back.

p1nkyy avatar Oct 04 '24 04:10 p1nkyy