View Single Post
Old 01-09-2013, 10:33 AM   #540
Junior Member
Shortie_1 began at the beginning.
Posts: 1
Karma: 10
Join Date: Jan 2013
Device: bookeen
Python error for language other than english


first let me thank you for this plugin as it greatly reduces the work to
keep my reader updated from calibre.

I tried to use your 'Auto populate from column name' feature from a
boolean column I use that is named #toberead.
Your default values of Y or N (translated to #toberead:yes and
#toberead:no in at line 1211 and 1213) will always give me a
parse error, a manually inserted true or false will not work as puts a "=" in at line 1217.

The reason for the error is the localization (I use the german language
in calibre) and how python behaves. In Python, boolean fields in german
are ja or nein - don't ask me for all the other languages that are
possible. However, true and false work without any problem. If I leave
the value field empty, treats it as #toberead:false which
works flawlessly - although in exactly the wrong way for me :-(

Could you change line 1211 to:
query = column_name + ':true'

and line 1213 to:
query = column_name + ':false'

This should work for all languages.

Shortie_1 is offline   Reply With Quote