Quote:
Originally Posted by lairdb
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...?
|
I'll have to look at that, as it looks like there was a change made a while ago that might have broken this. In a 2016, the plugin was changed to support templates in the URLs. Before that, the fields were encoded before being put into the URL. With this change, that no longer happened and it was up to the template to do that. I'll have to look back in the thread to see what was discussed at the time.
Quote:
(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
|
That's a Python 3 issue. I've fixed one of these recently. It isn't to fix.