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 03-05-2022, 09:32 PM   #1
PiperKev
Connoisseur
PiperKev began at the beginning.
 
Posts: 53
Karma: 10
Join Date: Sep 2020
Device: KOA3 JB
OPDS Client fails with calibre 5.38.0

This morning I upgraded calibre to the latest version, 5.38.0. After restarting, I attempted to invoke the OPDS Client plugin, and it failed with a "KeyError: 'Server'" error. I restarted calibre in debug mode and produced the attached log file.

After reinstalling calibre 5.37.0, the plugin worked as normal.

Has anyone noted any issues with 5.38?

Cheers,
Kevin
Attached Files
File Type: txt tmplw3dmol1.txt (4.7 KB, 155 views)
PiperKev is offline   Reply With Quote
Old 03-06-2022, 12:07 AM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,190
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
At a wild eyed guess, that plugin has not been updated to Python 3.

Take a look at model.py where you see import urllib2 and then later where you see lines starting with calibreRestSearchResponse = urllib2.urlopen(. urllib2 is deprecated in Python 3.

Edit: I had a bit of time to kill so I ran 2to3 (convert python2 code to python3 code) against the .py files for the plugin and added the modified files to a zip archive. The resultant plugin comes up asking which tool bars to show in and after a restart, the configuration dialog shows when I click on the icon. When I have the calibre server running on port 8080 and open the OPDS client, I can see the various selection options and libraries, etc. If I remove the checkmark on Hide books already in library, I can see the books. Since I am looking at the existing libraries, this is a bit useless other than for testing.
Attached Files
File Type: zip opds_client_2to3.zip (9.3 KB, 180 views)

Last edited by DNSB; 03-06-2022 at 12:43 AM.
DNSB is offline   Reply With Quote
Advert
Old 03-06-2022, 08:18 AM   #3
PiperKev
Connoisseur
PiperKev began at the beginning.
 
Posts: 53
Karma: 10
Join Date: Sep 2020
Device: KOA3 JB
The plugin was actually updated to Python 3 about a year and a half ago in response to calibre releasing version 5, which also went to Python 3. The author of the plugin did work to make it compatible, and it's worked on every iteration of calibre 5 until 5.38, which changed something under the dashboard and broke it.
PiperKev is offline   Reply With Quote
Old 03-06-2022, 09:16 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,347
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That will be be because feedparser bundled with calibre is updated to version 6. If the plugin needs version 5 it should use its own private copy.
kovidgoyal is online now   Reply With Quote
Old 03-06-2022, 09:39 AM   #5
PiperKev
Connoisseur
PiperKev began at the beginning.
 
Posts: 53
Karma: 10
Join Date: Sep 2020
Device: KOA3 JB
Thanks, Kovid! I'll add your info to my GitHub issue on the plugin!
PiperKev is offline   Reply With Quote
Advert
Old 03-06-2022, 01:07 PM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,190
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by PiperKev View Post
The plugin was actually updated to Python 3 about a year and a half ago in response to calibre releasing version 5, which also went to Python 3. The author of the plugin did work to make it compatible, and it's worked on every iteration of calibre 5 until 5.38, which changed something under the dashboard and broke it.
My bad. I was looking at the version from goodlibs' GitHub site.
DNSB is offline   Reply With Quote
Old 03-06-2022, 08:13 PM   #7
PiperKev
Connoisseur
PiperKev began at the beginning.
 
Posts: 53
Karma: 10
Join Date: Sep 2020
Device: KOA3 JB
The author pushed a fixed version that now works with calibre 5.38.0.

https://github.com/steinarb/opds-reader
PiperKev is offline   Reply With Quote
Old 03-06-2022, 08:56 PM   #8
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,190
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by PiperKev View Post
The author pushed a fixed version that now works with calibre 5.38.0.

https://github.com/steinarb/opds-reader
I've already picked up that one. After realizing that I'd look at the wrong version, I went to the 2nd Google search result. Sadly, the version from there still gives the following:

Spoiler:
Code:
calibre, version 5.38.0
ERROR: Unhandled exception: <b>KeyError</b>:'server'

calibre 5.38 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.22000 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22000')
Python 3.8.5
Windows: ('10', '10.0.22000', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeACSM (0, 0, 15) && DeDRM (10, 0, 2) && Annotations (1, 16, 0) && Baen (1, 2, 0) && Barnes & Noble (1, 2, 16) && Calibre Power Search Plugin (2, 1, 2) && Count Pages (1, 11, 2) && Diaps Editing Toolbag (0, 3, 7) && EpubCheck (0, 2, 4) && EpubMerge (2, 12, 0) && EpubSplit (3, 2, 0) && FanFicFare (4, 10, 0) && Fantastic Fiction (1, 5, 1) && Find Duplicates (1, 9, 4) && Goodreads (1, 5, 3) && Goodreads Sync (1, 15, 1) && Hyphenate This! (0, 1, 3) && ISFDB (3, 0, 0) && Job Spy (1, 0, 190) && KePub Output (3, 5, 3) && Kindle hi-res covers (0, 5, 0) && KindleUnpack - The Plugin (0, 83, 1) && Kobo Books (1, 8, 4) && Kobo Utilities (2, 15, 1) && KoboTouchExtended (3, 5, 4) && Modify ePub (1, 7, 0) && OPDS Client (1, 0, 0) && Obok DeDRM (10, 0, 0) && Open With (1, 7, 0) && Quality Check (1, 12, 1) && Resize Cover (1, 1, 0) && ScrambleEbook (0, 4, 5) && SmartEject (2, 4, 0) && Smashwords Metadata (1, 0, 2)
Traceback (most recent call last):
  File "calibre_plugins.opds_client.ui", line 24, in show_dialog
  File "calibre_plugins.opds_client.main", line 68, in __init__
  File "calibre_plugins.opds_client.model", line 78, in downloadOpdsRootCatalog
KeyError: 'server'

Last edited by DNSB; 03-06-2022 at 09:01 PM.
DNSB is offline   Reply With Quote
Old 03-07-2022, 07:43 AM   #9
PiperKev
Connoisseur
PiperKev began at the beginning.
 
Posts: 53
Karma: 10
Join Date: Sep 2020
Device: KOA3 JB
Quote:
Originally Posted by DNSB View Post
I've already picked up that one. After realizing that I'd look at the wrong version, I went to the 2nd Google search result. Sadly, the version from there still gives the following:

Spoiler:
Code:
calibre, version 5.38.0
ERROR: Unhandled exception: <b>KeyError</b>:'server'

calibre 5.38 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.22000 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22000')
Python 3.8.5
Windows: ('10', '10.0.22000', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeACSM (0, 0, 15) && DeDRM (10, 0, 2) && Annotations (1, 16, 0) && Baen (1, 2, 0) && Barnes & Noble (1, 2, 16) && Calibre Power Search Plugin (2, 1, 2) && Count Pages (1, 11, 2) && Diaps Editing Toolbag (0, 3, 7) && EpubCheck (0, 2, 4) && EpubMerge (2, 12, 0) && EpubSplit (3, 2, 0) && FanFicFare (4, 10, 0) && Fantastic Fiction (1, 5, 1) && Find Duplicates (1, 9, 4) && Goodreads (1, 5, 3) && Goodreads Sync (1, 15, 1) && Hyphenate This! (0, 1, 3) && ISFDB (3, 0, 0) && Job Spy (1, 0, 190) && KePub Output (3, 5, 3) && Kindle hi-res covers (0, 5, 0) && KindleUnpack - The Plugin (0, 83, 1) && Kobo Books (1, 8, 4) && Kobo Utilities (2, 15, 1) && KoboTouchExtended (3, 5, 4) && Modify ePub (1, 7, 0) && OPDS Client (1, 0, 0) && Obok DeDRM (10, 0, 0) && Open With (1, 7, 0) && Quality Check (1, 12, 1) && Resize Cover (1, 1, 0) && ScrambleEbook (0, 4, 5) && SmartEject (2, 4, 0) && Smashwords Metadata (1, 0, 2)
Traceback (most recent call last):
  File "calibre_plugins.opds_client.ui", line 24, in show_dialog
  File "calibre_plugins.opds_client.main", line 68, in __init__
  File "calibre_plugins.opds_client.model", line 78, in downloadOpdsRootCatalog
KeyError: 'server'

That's strange, because it's working fine for me with 5.38. Before I updated calibre, I removed the plugin and restarted. When I was sure it was gone, I updated to 5.38. I followed the instructions on GitHub to clone the repository and install it. Works perfectly!
PiperKev is offline   Reply With Quote
Old 03-07-2022, 11:40 AM   #10
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,190
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by PiperKev View Post
That's strange, because it's working fine for me with 5.38. Before I updated calibre, I removed the plugin and restarted. When I was sure it was gone, I updated to 5.38. I followed the instructions on GitHub to clone the repository and install it. Works perfectly!
I removed the old version, restarted calibre and then installed the new version. I'll give it another try,

Edit: My default is to have the content server user/password protected. I had to disable authentication for the plugin to work.

Last edited by DNSB; 03-07-2022 at 12:57 PM.
DNSB is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OPDS Client that will allow selection of format? PiperKev Plugins 1 02-14-2021 01:42 AM
calibre as an OPDS client cedhax Related Tools 1 07-19-2016 04:16 AM
just found this: OPDS client testing catalog At_Libitum Marvin 1 11-14-2013 03:47 PM
OPDS Client? Kudalufi Calibre 9 12-21-2012 01:59 AM
Touch OPDS client ??? vlad59 Kobo Reader 7 12-04-2011 09:36 AM


All times are GMT -4. The time now is 12:05 AM.


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