Could not add extra lookup sources

Bug #1992278 reported by Vaughn Li
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

hi, I could not add another lookup sources. e.g: DuckDuckGo{word}
More details here:

calibre, version 6.6.1
ERROR: Unhandled exception: <b>TypeError</b>:&lt;function google_dictionary at 0x1140b8f70&gt; is not JSON serializable

calibre 6.6.1 embedded-python: True
macOS-12.6-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '21.6.0', 'Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64')
Python 3.10.1
OSX: ('12.6', ('', '', ''), 'x86_64')
Interface language: None
Traceback (most recent call last):
  File "calibre/gui2/viewer/", line 205, in accept
  File "calibre/utils/", line 429, in __setitem__
  File "calibre/utils/", line 395, in commit
  File "calibre/utils/", line 413, in to_raw
  File "calibre/utils/", line 109, in json_dumps
  File "json/", line 238, in dumps
  File "json/", line 201, in encode
  File "json/", line 431, in _iterencode
  File "json/", line 405, in _iterencode_dict
  File "json/", line 325, in _iterencode_list
  File "json/", line 405, in _iterencode_dict
  File "json/", line 438, in _iterencode
  File "calibre/utils/", line 62, in to_json
TypeError: <function google_dictionary at 0x1140b8f70> is not JSON serializable

Since Google dictionary triggers its annoying CAPTCHA, hope more sources could be added.
Thank you in advance.

Revision history for this message
Vaughn Li (vaughnli) wrote :
Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.