Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 04-30-2024, 11:44 PM   #151
DaySleeper
Connoisseur
DaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toys
 
Posts: 56
Karma: 5532
Join Date: Jul 2017
Device: MoonReader+ Android app on Samsung Galaxy S6 Lite and otherst
Similar here:

calibre, version 6.14.1
ERROR: Unhandled exception: <b>KeyError</b>: Failed to download e-book

calibre 6.14.1 Portable embedded-python: True
Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19045')
Python 3.10.1
Windows: ('10', '10.0.19045', 'SP0', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeACSM (0, 0, 16) && Gather KFX-ZIP (from KFX Input) (2, 10, 0) && DeDRM (10, 0, 3) && Package KFX (from KFX Input) (2, 10, 0) && Access Aide (0, 1, 13) && Action Chains (1, 18, 19) && Annotations (1, 17, 13) && Calibre Power Search Plugin (2, 2, 0) && CalibreSpy (1, 0, 92) && Count Pages (1, 13, 6) && DOC Input (1, 0, 1) && Ebook Translator (2, 3, 3) && Editor Chains (0, 8, 3) && EpubMerge (2, 18, 0) && EpubSplit (3, 6, 0) && FanFicFare (4, 20, 0) && FictionDB (1, 4, 1) && Find Duplicates (1, 10, 9) && GetFileName (0, 2, 0) && Goodreads (1, 8, 1) && Goodreads_Rating (4, 0, 0) && Job Spy (1, 0, 205) && KFX metadata reader (from KFX Input) (2, 10, 0) && From KFX (2, 10, 0) && KFX Input (2, 10, 0) && Set KFX metadata (from KFX Output) (2, 3, 1) && KFX Output (2, 3, 1) && Kindle Collections (1, 7, 29) && KindleUnpack - The Plugin (0, 83, 1) && Mass Search-Replace (1, 7, 1) && Media File Importer (1, 0, 27) && Modify ePub (1, 8, 2) && MultiColumnSearch (1, 0, 96) && Open With (1, 8, 1) && OverDrive Libby (0, 1, 9) && Overdrive Link (2, 57, 0) && Reading List (1, 15, 1) && Save To Format (0, 0, 6) && Search The Internet (1, 10, 4) && Similar Stories (1, 0, 58) && Standard Ebooks (1, 0, 0) && TTS to MP3 (0, 6, 0) && View Manager (1, 10, 2) && Wiki Reader (2, 2, 1) && all recipes Recipe Reader (1, 0, 2) && Overdrive Link Metadata Source (2, 57, 0)
Traceback (most recent call last):
File "calibre\gui2\threaded_jobs.py", line 82, in start_work
File "calibre_plugins.overdrive_libby.magazine_download ", line 387, in __call__
File "calibre_plugins.overdrive_libby.magazine_download ", line 467, in _custom_download
File "calibre_plugins.overdrive_libby.libby.client" , line 822, in process_ebook
KeyError: 'openbook'
DaySleeper is offline   Reply With Quote
Old 05-01-2024, 05:07 AM   #152
sgmoore
Connoisseur
sgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfolded
 
Posts: 59
Karma: 52636
Join Date: Mar 2021
Device: Kindle Voyage
Quote:
Originally Posted by DaySleeper View Post
Similar here:

calibre, version 6.14.1
ERROR: Unhandled exception: <b>KeyError</b>: Failed to download e-book

..
File "calibre_plugins.overdrive_libby.libby.client" , line 822, in process_ebook
KeyError: 'openbook'

Strange. That was the error I was getting before I used the web token as per spicefather's instructions, but it is working now.

Just tried it again to download the "Guardian Weekly" to confirm it is still working.
sgmoore is offline   Reply With Quote
Old 05-01-2024, 11:44 AM   #153
Pjama
Guru
Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.
 
Pjama's Avatar
 
Posts: 694
Karma: 2345678
Join Date: Apr 2016
Location: USA
Device: Scribe, Oasis, Clara 2E, Libra 2, Libra Colour
Quote:
Originally Posted by sgmoore View Post
Strange. That was the error I was getting before I used the web token as per spicefather's instructions, but it is working now.

Just tried it again to download the "Guardian Weekly" to confirm it is still working.
I am still getting the key error.

I have tried entering new code in the json file again (several times), restarting my computer, I also tried generating a new code for the plugin from Libby. Same result - each time I try to download a magazine, I get the key error.

I can right-click on the magazine in my list of loans inside the plugin, so I know that part is working fine. It just will not download. I even tried a Guardian Weekly as that worked in your case.

Is it possible the plugin or Libby are looking for a magazine but the magazine has been given a different key property, something like that? (NB books work fine for me).

Here is my error message:

Code:
calibre, version 7.9.0
ERROR: Unhandled exception: <b>KeyError</b>: Failed to download e-book

calibre 7.9  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:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000')
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: Gather KFX-ZIP (from KFX Input) (1, 48, 0) && DeDRM (10, 0, 3) && Package KFX (from KFX Input) (1, 48, 0) && Check Books (0, 1, 8) && EpubCheck (0, 2, 5) && Find Duplicates (1, 10, 8) && KFX metadata reader (from KFX Input) (1, 48, 0) && KFX Input (1, 48, 0) && Set KFX metadata (from KFX Output) (1, 61, 0) && KFX Output (1, 61, 0) && KePub Input (3, 4, 3) && KePub Metadata Reader (3, 4, 3) && KePub Metadata Writer (3, 4, 3) && Kindle hi-res covers (0, 5, 1) && KindleUnpack - The Plugin (0, 83, 1) && Kobo Utilities (2, 16, 13) && KoboTouchExtended (3, 6, 7) && Modify ePub (1, 8, 2) && Obok DeDRM (7, 1, 0) && OverDrive Libby (0, 1, 9) && Quality Check (1, 12, 0) && Save To Format (0, 0, 6)
Traceback (most recent call last):
  File "calibre/gui2/threaded_jobs.py", line 85, in start_work
  File "calibre_plugins.overdrive_libby.magazine_download", line 387, in __call__
    downloaded_filepath = self._custom_download(
                          ^^^^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.overdrive_libby.magazine_download", line 467, in _custom_download
    download_base, openbook, rosters = libby_client.process_ebook(loan)
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.overdrive_libby.libby.client", line 822, in process_ebook
    openbook = self.send_request(meta["urls"]["openbook"])
                                 ~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'openbook'

Last edited by Pjama; 05-02-2024 at 10:37 AM. Reason: adding code brackets
Pjama is offline   Reply With Quote
Old 05-01-2024, 11:50 AM   #154
Pjama
Guru
Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.
 
Pjama's Avatar
 
Posts: 694
Karma: 2345678
Join Date: Apr 2016
Location: USA
Device: Scribe, Oasis, Clara 2E, Libra 2, Libra Colour
Hoping someone can see what is going on in my plugin - sometimes it calls a magazine an ebook, maybe that is something to do with it?
It also does not like openbook = self.send_request(meta["urls"]["openbook"])

Could it maybe be looking for "openmagazine" in the square braces? Or maybe openbook on the left side of the assignment should be openmagazine?

Just putting it out there, as do not know the code behind all this.
Pjama is offline   Reply With Quote
Old 05-01-2024, 11:17 PM   #155
DaySleeper
Connoisseur
DaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toys
 
Posts: 56
Karma: 5532
Join Date: Jul 2017
Device: MoonReader+ Android app on Samsung Galaxy S6 Lite and otherst
Quote:
Originally Posted by Pjama View Post
I am still getting the key error.

I have tried entering new code in the json file again (several times), restarting my computer, I also tried generating a new code for the plugin from Libby. Same result - each time I try to download a magazine, I get the key error.
That's my experience as well.
DaySleeper is offline   Reply With Quote
Old 05-01-2024, 11:17 PM   #156
Tomifonication
Luddite
Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.
 
Tomifonication's Avatar
 
Posts: 51
Karma: 90670
Join Date: Aug 2018
Location: Vancouver, CA
Device: Kindle Paperwhite 5
Adding my two cents here that I too am receiving the HTTP 403 error and the plugin is currently unusable.
Tomifonication is offline   Reply With Quote
Old 05-02-2024, 02:28 AM   #157
miss_p1nky
Enthusiast
miss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enough
 
Posts: 48
Karma: 636
Join Date: Aug 2022
Location: Indonesia
Device: Moon+ Reader Pro
Quote:
Originally Posted by Tomifonication View Post
Adding my two cents here that I too am receiving the HTTP 403 error and the plugin is currently unusable.
There's already a solution. Read the page before this one.
miss_p1nky is offline   Reply With Quote
Old 05-02-2024, 07:32 AM   #158
sgmoore
Connoisseur
sgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfolded
 
Posts: 59
Karma: 52636
Join Date: Mar 2021
Device: Kindle Voyage
Quote:
Originally Posted by Pjama View Post
Hoping someone can see what is going on in my plugin - sometimes it calls a magazine an ebook, maybe that is something to do with it?
It also does not like openbook = self.send_request(meta["urls"]["openbook"])

Could it maybe be looking for "openmagazine" in the square braces? Or maybe openbook on the left side of the assignment should be openmagazine?

Just putting it out there, as do not know the code behind all this.
No, openbook is correct.

When you download a magazine it sends a request to overdrive and you should get a response that looks like

Code:
{
  "urls": {
    "web": "https://dewey-c5a399a962cbe1bfd566f164d6158f5d.read.libbyshelf.com/",
    "openbook": "https://dewey-c5a399a962cbe1bfd566f164d6158f5d.read.libbyshelf.com/_d/openbook.json",
    "rosters": "https://dewey-c5a399a962cbe1bfd566f164d6158f5d.read.libbyshelf.com/_d/roster.json",
    "possession": "https://dewey-c5a399a962cbe1bfd566f164d6158f5d.read.libbyshelf.com/_d/possession",
    "activity": "https://dewey-c5a399a962cbe1bfd566f164d6158f5d.read.libbyshelf.com/_d/activity"
  },
  "message": ".....",
  "bankscope": "title-c5a399a96",
  "expires": 1716422399
}
(I've left out the message part and formatted it to make it more readable)

However if you don't have the correct id/token, then you get a response like

Code:
{
  "urls": {
    "web": "https://dewey-c5a399a962cbe1bfd566f164d6158f5d.read.libbyapp.com/",
    "possession": "https://dewey-c5a399a962cbe1bfd566f164d6158f5d.read.libbyapp.com/_d/possession",
    "activity": "https://dewey-c5a399a962cbe1bfd566f164d6158f5d.read.libbyapp.com/_d/activity"
  },
  "message": ".....,
  "bankscope": "title-c5a399a96",
  "expires": 1716422399
}
which is missing the two important bits openbook and rosters.
Hence the plugin crashes when it tries to read the value of meta["urls"]["openbook"]
sgmoore is offline   Reply With Quote
Old 05-02-2024, 10:33 AM   #159
Pjama
Guru
Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.Pjama ought to be getting tired of karma fortunes by now.
 
Pjama's Avatar
 
Posts: 694
Karma: 2345678
Join Date: Apr 2016
Location: USA
Device: Scribe, Oasis, Clara 2E, Libra 2, Libra Colour
Thanks - I am in the python code behind the scenes and reviewing the lines of the files quoted in my error response. But I can't find where to get the code you posted above with the url object etc. Can you please tell me where I can find this?

Thanks so much

Last edited by Pjama; 05-02-2024 at 11:01 AM. Reason: Found the magazine files and am reviewing before I update my post
Pjama is offline   Reply With Quote
Old 05-02-2024, 01:03 PM   #160
sgmoore
Connoisseur
sgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfoldedsgmoore reads XML... blindfolded
 
Posts: 59
Karma: 52636
Join Date: Mar 2021
Device: Kindle Voyage
Quote:
Originally Posted by Pjama View Post
Thanks - I am in the python code behind the scenes and reviewing the lines of the files quoted in my error response. But I can't find where to get the code you posted above with the url object etc. Can you please tell me where I can find this?

Thanks so much
The plugin does not display capture the requests and responses unless you are running in debug mode. (In windows, you can press Ctrl-Shift-R to restart in debug-mode and when you close down, calibre will open the log in notepad)


The relevant lines of code are from https://github.com/ping/libby-calibr...client.py#L820

Code:
    
        download_base, meta = self.prepare_loan(loan)
        # contains nav/toc and spine, manifest
        openbook = self.send_request(meta["urls"]["openbook"])
        rosters: List[Dict] = self.send_request(meta["urls"]["rosters"])
The first line 820 calls self.prepare_loan(loan) and this fires a request to overdrive. If you are running in debug mode you should see a line starting with

Code:
[overdrive_libby/0.1.9] REQUEST: GET https://sentry-read.svc.overdrive.com/open/magazine/card/
followed a few lines later by a line starting

Code:
[overdrive_libby/0.1.9] RESPONSE: 200 https://sentry-read.svc.overdrive.com/open/magazine/card/
This has a few lines of headers and then the body which will start with a line like

Code:
[overdrive_libby/0.1.9] RES BODY: {"urls":{"web":

It is this body that is assigned to the variable meta on line 820 and of course if the body does not have a url for openbook then line 822 will blow up.
sgmoore is offline   Reply With Quote
Old 05-02-2024, 08:45 PM   #161
DaySleeper
Connoisseur
DaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toysDaySleeper shares his or her toys
 
Posts: 56
Karma: 5532
Join Date: Jul 2017
Device: MoonReader+ Android app on Samsung Galaxy S6 Lite and otherst
Quote:
Originally Posted by miss_p1nky View Post
There's already a solution. Read the page before this one.
Unfortunately, the solution mentioned hasn't worked for many of us.
DaySleeper is offline   Reply With Quote
Old 05-02-2024, 10:18 PM   #162
Tomifonication
Luddite
Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.
 
Tomifonication's Avatar
 
Posts: 51
Karma: 90670
Join Date: Aug 2018
Location: Vancouver, CA
Device: Kindle Paperwhite 5
Quote:
Originally Posted by DaySleeper View Post
Unfortunately, the solution mentioned hasn't worked for many of us.
Correct, it didn't work for me.
Tomifonication is offline   Reply With Quote
Old 05-02-2024, 10:26 PM   #163
miss_p1nky
Enthusiast
miss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enough
 
Posts: 48
Karma: 636
Join Date: Aug 2022
Location: Indonesia
Device: Moon+ Reader Pro
Quote:
Originally Posted by DaySleeper View Post
Unfortunately, the solution mentioned hasn't worked for many of us.
Quote:
Originally Posted by Tomifonication View Post
Correct, it didn't work for me.
It doesn't work for downloading magazines.
Other features are back normally.
miss_p1nky is offline   Reply With Quote
Old 05-02-2024, 11:33 PM   #164
Tomifonication
Luddite
Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.Tomifonication composes epic poetry in binary.
 
Tomifonication's Avatar
 
Posts: 51
Karma: 90670
Join Date: Aug 2018
Location: Vancouver, CA
Device: Kindle Paperwhite 5
Quote:
Originally Posted by miss_p1nky View Post
It doesn't work for downloading magazines.
Other features are back normally.
You can underline magazines all you want, it's not working for anything. It isn't the developer's fault that it isn't, but giving the impression it is when it isn't doesn't help anyone.
Tomifonication is offline   Reply With Quote
Old 05-03-2024, 12:29 AM   #165
miss_p1nky
Enthusiast
miss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enoughmiss_p1nky will become famous soon enough
 
Posts: 48
Karma: 636
Join Date: Aug 2022
Location: Indonesia
Device: Moon+ Reader Pro
Quote:
Originally Posted by Tomifonication View Post
You can underline magazines all you want, it's not working for anything. It isn't the developer's fault that it isn't, but giving the impression it is when it isn't doesn't help anyone.
Downloading books, managing holds, managing cards, etc works with the new temporary fix. So how come you said it's not working for anything? It only doesn't work for magazines. All other features still work. I rest my case.
miss_p1nky is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Overdrive Link jhowell Plugins 1264 05-01-2024 12:08 PM
No Local Public Library. Overdrive/Libby Possible? enuddleyarbl Kobo Reader 2 06-08-2023 07:23 PM
Library borrowing: Overdrive vs. Libby haertig General Discussions 83 01-30-2023 04:21 PM
Libby, the new Overdrive App Cosimo News 30 12-02-2017 09:42 AM
Overdrive's Libby Loves2Read4Fun General Discussions 2 12-20-2016 01:32 PM


All times are GMT -4. The time now is 11:31 PM.


MobileRead.com is a privately owned, operated and funded community.