ping / libby-calibre-plugin

OverDrive Libby Plugin for calibre
https://www.mobileread.com/forums/showthread.php?t=354816
GNU General Public License v3.0
76 stars 16 forks source link

ClientForbiddenError any time access libby #24

Closed mlkramer768 closed 7 months ago

mlkramer768 commented 7 months ago

I did try a new code as well

calibre, version 7.8.0 ERROR: Unhandled exception: ClientNotFoundError:<calibre_plugins.overdrive_libby.libby.errors.ClientNotFoundError; http_status=404, msg='HTTP Error 404: Not Found', error_response='{"result":"not_found"}''>

calibre 7.8 embedded-python: True macOS-14.4.1-arm64-arm-64bit Darwin ('64bit', '') ('Darwin', '23.4.0', 'Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:41 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8103') Python 3.11.5 OSX: ('14.4.1', ('', '', ''), 'arm64') 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, 10, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 10, 0) && Goodreads Sync (1, 16, 5) && KFX metadata reader (from KFX Input) (2, 10, 0) && From KFX (2, 10, 0) && KFX Input (2, 10, 0) && OverDrive Libby (0, 1, 9) Traceback (most recent call last): 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 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 404: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "calibre_plugins.overdrive_libby.action", line 133, in triggered=lambda: self.interface_action_base_plugin.do_user_config( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "calibre/customize/init.py", line 188, in do_user_config File "calibre_plugins.overdrive_libby.init", line 104, in save_settings config_widget.save_settings() File "calibre_plugins.overdrive_libby.config", line 948, in save_settings libby_client.clone_by_code(setup_code) File "calibre_plugins.overdrive_libby.libby.client", line 613, in clone_by_code res: Dict = self.send_request("chip/clone/code", params={"code": code}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "calibre_plugins.overdrive_libby.libby.client", line 538, in send_request ErrorHandler.process(e, error_response) File "calibre_plugins.overdrive_libby.libby.errors", line 135, in process raise ClientNotFoundError( calibre_plugins.overdrive_libby.libby.errors.ClientNotFoundError: <calibre_plugins.overdrive_libby.libby.errors.ClientNotFoundError; http_status=404, msg='HTTP Error 404: Not Found', error_response='{"result":"not_found"}''>

droidlyy commented 7 months ago

calibre 7.8 Portable embedded-python: True Windows-10-10.0.22631-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.22631') Python 3.11.5 Windows: ('10', '10.0.22631', 'SP0', 'Multiprocessor Free') Interface language: None EXE path: D:\Software\Calibre\Calibre Portable\Calibre\calibre.exe Successfully initialized third party plugins: DeACSM (0, 0, 16) && DeDRM (10, 0, 3) && OverDrive Libby (0, 1, 9) Traceback (most recent call last): File "calibre_plugins.overdrive_libby.libby.client", line 518, in send_request 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_plugins.overdrive_libby.workers", line 351, in run File "calibre_plugins.overdrive_libby.libby.client", line 631, in sync File "calibre_plugins.overdrive_libby.libby.client", line 538, in send_request File "calibre_plugins.overdrive_libby.libby.errors", line 143, in process calibre_plugins.overdrive_libby.libby.errors.ClientForbiddenError: <calibre_plugins.overdrive_libby.libby.errors.ClientForbiddenError; http_status=403, msg='HTTP Error 403: Forbidden', error_response='{"result":"missing_chip"}''

mlkramer768 commented 7 months ago

I did seem to fix after 3rd try of entering new code.