View Single Post
Old 07-12-2025, 05:05 PM   #354
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,588
Karma: 79436940
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Ok. Had another loan show up today. Onyx Storm. While yes, the Borrow button was available, clicking it resulted in
Spoiler:

Code:
calibre, version 8.6.0
ERROR: Unhandled exception: <b>ClientBadRequestError</b>: Failed to borrow book<p>This title is no longer available. You may be able to place it on hold, or add it to your wish list and borrow it later. [errorcode: TitleNoLongerAvailable]</p>

calibre 8.6  embedded-python: True
Linux-6.6.76-08024-gb30cb4a129c2-x86_64-with-glibc2.36 Linux ('64bit', 'ELF')
('Linux', '6.6.76-08024-gb30cb4a129c2', '#1 SMP PREEMPT_DYNAMIC Fri, 25 Apr 2025 05:08:33 -0700')
Python 3.11.12
Interface language: None
EXE path: /opt/calibre/bin/calibre-debug
Successfully initialized third party plugins: DeACSM (0, 0, 16) && LCPL Input (0, 0, 5) && DeDRM (10, 0, 9) && Annotations (1, 17, 13) && Backup Configuration Folder (1, 1, 2) && EpubMerge (3, 2, 0) && EpubSplit (3, 11, 0) && Find Duplicates (1, 10, 9) && Goodreads (1, 8, 3) && Kindle hi-res covers (0, 5, 1) && Kobo Metadata (1, 11, 0) && Kobo Utilities (2, 23, 0) && Manage Series (1, 5, 2) && OverDrive Libby (0, 2, 102) && Quality Check (1, 14, 2) && Reading List (1, 15, 6) && SmartEject (2, 6, 1) && View Manager (1, 10, 3)
Traceback (most recent call last):
  File "calibre_plugins.overdrive_libby.libby.client", line 522, 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 400: Bad Request

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.borrow_book", line 40, in __call__
    loan = libby_client.borrow_media(media, card, is_lucky_day_loan)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.overdrive_libby.libby.client", line 950, in borrow_media
    return self.borrow_title(
           ^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.overdrive_libby.libby.client", line 925, in borrow_title
    res: Dict = self.send_request(
                ^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.overdrive_libby.libby.client", line 599, in send_request
    return self._send_request(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.overdrive_libby.libby.client", line 542, in _send_request
    ErrorHandler.process(e, error_response)
  File "calibre_plugins.overdrive_libby.libby.errors", line 124, in process
    raise error_info["error"](
calibre_plugins.overdrive_libby.libby.errors.ClientBadRequestError: <calibre_plugins.overdrive_libby.libby.errors.ClientBadRequestError; http_status=400, msg='This title is no longer available. You may be able to place it on hold, or add it to your wish list and borrow it later. [errorcode: TitleNoLongerAvailable]', error_response='{"result":"upstream_failure","upstream":{"errorCode":"TitleNoLongerAvailable","service":"THUNDER","httpStatus":400,"userExplanation":"This title is no longer available. You may be able to place it on hold, or add it to your wish list and borrow it later.","correlationId":"ea9444c32103fdafd05589a9a5d26d9e"}}''>

|Admittedly this might have been a second click on the button; the first time had no error and no change to any status so I assumed the click had not registered.

Luckily I was in debug mode, so attached find the JSON from a search and the log.
Attached Files
File Type: txt onyx_storm_json.txt (12.3 KB, 22 views)
File Type: txt calibre-debug-log.txt (167.1 KB, 23 views)
PeterT is offline   Reply With Quote