View Single Post
Old 05-11-2024, 08:37 PM   #664
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 909
Karma: 810834
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
A template has stopped working.
I was using the formula from this thread https://www.mobileread.com/forums/sh...&postcount=574

Code:
python:
def evaluate(book, context):
	vals = context.funcs.book_values('#ranking', 'title:true', '&', 0).split('&')
	vals = sorted([float(v) for v in vals], reverse=True)
	return str(1 + vals.index(float(book.get('#ranking'))))

to calculate the ranking position and now it says that there is an error on line 4
Give me a hand with the solution
dunhill is offline   Reply With Quote