View Single Post
Old 01-16-2021, 01:43 PM   #345
lairdb
dog ear
lairdb began at the beginning.
 
Posts: 53
Karma: 12
Join Date: Jan 2012
Device: lots
& (and other specials?) not being translated?

I don't have the old one to compare, but I'm fairly sure that the plugin previously encoded special characters in substituted templates. (Or it handled multivalue templates differently, or something.)

Example issue: the {author} string
Code:
Hans Rosling & Ola Rosling & Anna Rosling Rönnlund
now comes through as
Code:
Hans%20Rosling%20&%20Ola%20Rosling%20&%20Anna%20Rosling%20Rönnlund
...and although the spaces are encoded, the ampersands are not and break the URL.

Do I now need a function wrapping each template entry, or...?

Thanks.

(Calibre 5.9, plugin 1.8.1. Also, incidentally, opening Customize and clicking help yields an exception, pasted below.)
Spoiler:
Code:
calibre, version 5.9.0
ERROR: Unhandled exception: <b>TypeError</b>:write() argument must be str, not bytes

calibre 5.9 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 36, 0) && Package KFX (from KFX Input) (1, 36, 0) && Find Duplicates (1, 8, 3) && Goodreads Sync (1, 15, 0) && KFX metadata reader (from KFX Input) (1, 36, 0) && KFX Input (1, 36, 0) && Manage Series (1, 2, 11) && Overdrive Link (2, 44, 0) && Quality Check (1, 11, 0) && Search The Internet (1, 8, 1)
Traceback (most recent call last):
  File "calibre_plugins.search_the_internet.config", line 982, in help_link_activated
  File "calibre_plugins.search_the_internet.action", line 279, in show_help
  File "calibre_plugins.search_the_internet.action", line 277, in get_help_file_resource
TypeError: write() argument must be str, not bytes
lairdb is offline   Reply With Quote