View Single Post
Old 05-10-2024, 05:05 PM   #1724
Ambassador Dave
Junior Member
Ambassador Dave began at the beginning.
 
Posts: 1
Karma: 10
Join Date: May 2024
Device: Kindle Paperwhite
Hey, long time user, first time poster. Been a big fan of tying my ebooks to Goodreads through Calibre with your plugin. Found this forum today because of an error trying to sync new books with Goodreads:

Short version (popup window primary text)
Code:
ERROR: Unhandled exception

HTTPSConnection.__init__() got an unexpected keyword argument 'key_file'
Long version (popup window show details)
Spoiler:
Code:
calibre, version 7.10.0
ERROR: Unhandled exception: <b>TypeError</b>:HTTPSConnection.__init__() got an unexpected keyword argument 'key_file'

calibre 7.10  embedded-python: False
Linux-6.8.9-arch1-1-x86_64-with-glibc2.39 Linux ('64bit', 'ELF')
('Linux', '6.8.9-arch1-1', '#1 SMP PREEMPT_DYNAMIC Thu, 02 May 2024 17:49:46 +0000')
Python 3.12.3
Interface language: None
EXE path: /usr/bin/python3
Successfully initialized third party plugins: DeACSM (0, 0, 16) && DeDRM (10, 0, 3) && Goodreads Sync (1, 16, 5) && Obok DeDRM (10, 0, 3)
Traceback (most recent call last):
  File "calibre_plugins.goodreads_sync.action", line 436, in search_goodreads_to_link_book
    self.search_to_link_books(calibre_books)
  File "calibre_plugins.goodreads_sync.action", line 458, in search_to_link_books
    goodreads_id_for_isbn = self.grhttp.get_goodreads_id_for_isbn(isbn)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.goodreads_sync.core", line 416, in get_goodreads_id_for_isbn
    (response, content) = self._request_get(url, suppress_status='404')
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.goodreads_sync.core", line 176, in _request_get
    response, content = h.request(url, method='GET')
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "calibre_plugins.goodreads_sync.httplib2.__init__", line 1561, in request
    conn = self.connections[conn_key] = connection_type(
                                        ^^^^^^^^^^^^^^^^
  File "calibre_plugins.goodreads_sync.httplib2.__init__", line 999, in __init__
    httplib.HTTPSConnection.__init__(self, host, port=port,
TypeError: HTTPSConnection.__init__() got an unexpected keyword argument 'key_file'


I found this elsewhere (Ansible project on Github) while searching for a potential solution:
Code:
The use of cert_file and key_file with HTTPSConnection was deprecated in Python 3.6 and removed in Python 3.12.
I checked my OS (EndeavourOS, an Arch Linux variant) and confirmed that Python was recently updated to version 3.12. Good chance I'm at the forefront of this affecting other Linux users. Arch updates early and often, yet other distros will surely update to Python version 3.12+ in time.

Thanks for the plugin, I'd love to see it working on my system again!
Ambassador Dave is offline   Reply With Quote