@Puciek - welcome to MobileRead.
As for your error - I guess it must be a side-effect of the changes made to the safe_format() functions that I had to switch between since Calibre code got ripped out I used to use.
There is quite possibly a simple fix I can make in my code to workaround this but hopefully chaley or Kovid can tell me what it is. If they happen to stumble across this thread, the code is effectively doing this:
Code:
url = template_formatter.safe_format(tokenised_url, fixed_vals, 'STI template error', mi)
open_url(QUrl.fromEncoded(url))
It is that second line where it tries to encode the result from safe_format that is blowing up. The value of url at that point would likely be something like:
Code:
http://www.foo.com/myquery?search=ęń