View Single Post
Old 03-19-2022, 09:14 PM   #51
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,856
Karma: 145625116
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by LWTBP View Post
Hey. Yes, I tried 1.5.3 and I'm getting the same error. Also tried to add the default resolution of 758x1024 and make it the default. Didn't work. Are you facing this error?
I haven't used Prettify Cover in quite a while. I found that I prefer using GIMP directly for the individualized control over the images. I hadn't tried changing the default resolution from the 1000x1500 that I had set back then. I just tried now and get the unicode error.

Looking at the config.py file, line 170 reads:
Code:
        if unicode(self.item(row, 2).text()).strip() == 'Default':
and line 173 reads:
Code:
        for update_row in range(0, self.rowCount()):
I'm not the greatest programmer around but I do seem to remember that in Python 2, unicode was a specialized variant of the str function whereas Python 3 pretty much uses Unicode as it's default. There was also a use of xrange in line 173. Changing the unicode to str and the xrange to range allows me to add a new size and make it the default. Please note that this will break Python 2 compatibility so I bumped the minimum calibre version in __init__.py to 5.0.0.

I've attached the modified file to this message if anyone wants to give it a try.
Attached Files
File Type: zip PrettifyCover.zip (94.0 KB, 136 views)
DNSB is online now   Reply With Quote