View Single Post
Old 08-28-2014, 10:30 AM   #40
dgparryuk
Enthusiast
dgparryuk began at the beginning.
 
Posts: 33
Karma: 10
Join Date: Dec 2013
Device: Kobo Glo
gah - won't let me save after changing some of the preferences...
will have another play -

something about the line "for i in range(self.columns.count())]" that seems to be blowing it up...


, line 75, in options - AttributeError: 'unicode' object has no attribute 'toString'

Code:
    def options(self):
        '''
        Return a dict of current options
        '''
        opts = {}
        all_formats = [unicode(self.columns.item(i).data(Qt.UserRole).toString())
            for i in range(self.columns.count())]
        enabled_formats = [unicode(self.columns.item(i).data(Qt.UserRole).toString())
            for i in range(self.columns.count()) if self.columns.item(i).checkState()==Qt.Checked]
        opts['kindle_supported_formats'] = all_formats
        opts['kindle_enabled_formats'] = enabled_formats
        return opts

Last edited by dgparryuk; 08-28-2014 at 10:51 AM.
dgparryuk is offline   Reply With Quote