View Single Post
Old 05-28-2021, 10:05 AM   #2251
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,906
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Shadowjack View Post
I am getting the following error/message in my comments field on my kobo when i look at the details for my books. "Plugboard template error name 'unichr' is not defined..."

I recently upgraded to the latest version of calibre (5.18) and plugins (for a long time I stayed with 4.23).

The only template i am using with the plugboard is
epub:KOBOTOUCHEXTENDED = ([{pubdate:|<div>Published: |</div>}{rating:rating_as_stars()|<div>Rating: |</div>}
{#pages:|<div>Page count: |} \ {#words:|Word count: |</div>}{tags:|<div>Tags: |
</div>}<hr/>{comments}] -> comments)

Thoughts?
How is the function "rating_as_stars" defined? I have one defined as a user template function. That uses "unichr". For calibre 5, it needs to be changed to import the module "six" and to use "six.unichr". But, calibre now has the function "rating_to_stars" which does the same thing and can handle half stars. Just replacing "rating_as_stars" with "rating_to_stars" should do work

Also, this isn't a plugin problem. It is a metadata plugboard. The same plugboard could be used for any device.
davidfor is offline   Reply With Quote