Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 04-17-2016, 09:50 AM   #1
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Tabbed Driver Configuration

I made a comment in a thread earlier in the year about options seeming to the bane of my life. That was about the options for a plugin, but the set of options that I was really thinking of are those in the drivers. Or specifically, the extra customisation options in the KoboTouch driver. Any time I need to change these, it's a pain. Especially if I want to group the changes.

I've been thinking about this for a while, but finally got around to it earlier this year. The biggest thing is I didn't want to break anything or have to re-implement a lot of the options and how they are handled in the different drivers.

What I have come up with is a tabbed interface. The first tab is "File Formats" and has the common options including the file formats save template. After this, are the custom tabs for the driver. There is one last tab, "Extra Customization" if these are needed.

There are several new classes. The main one is "TabbedDeviceConfig". This is to be expected to be subclassed for any specific driver. But, if used by a driver will show the "File Formats" and "Extra Customization" tabs and work the same as the existing ConfigWidget.

There are two other abstract classes. "DeviceConfigTab" is parent class for a device specific tab. The other is "DeviceOptionsGroupBox". This is intended as the parent class for groups of options displayed on the tabs. The subclasses of this should implement the actual options. This will include any interactions between the options such as disabling certain options when another is selected. This is where most of the code for individual drivers will be.

Across these three classes, I have implemented some accessors so that the device specific options can be treated as properties. Making a call against a subclass of TabbedDeviceConfig will search all known tabs for the property or method. The subclass of DeviceConfigTab will search all known widgets, expected to be subclasses of DeviceOptionsGroupBox, for the accessor.

I have done a full implementation of this for the KOBOTOUCH driver. KOBOTOUCHConfig has two tabs, each with two groups of options. The options within the groups are related and, in some cases, interdependent. Selecting "Update metadata" will enable the "Set Series information" option. The first three attached screenshots show the three tabs for the driver. While making the changes to the driver to use the new configuration, I have made most of the options into properties in the driver. That made changing to the new configuration easier. Plus, the old versions was just ugly. I also needed to add a migration routine from the old to the new configuration. This will get run each time the driver is loaded until the user opens and saves the configuration. After that, it will not do anything.

For the KOBO driver, I have not done the full implementation. But, I have changed it to use TabbedDeviceConfig. This driver is stable and I haven't needed to make changes in the options for a long. I haven't decided whether to complete the changes for this driver.

A complication in this is the KoboTouchExtended driver. This is a subclass of KOBOTOUCH but is a separate plugin. I have made some small changes to my local copy of this to use new configuration. The fourth screenshot is of the "Extra Customization" tab for this driver. This demonstrates the mixing of the methods for doing the options.

I have been using this for about three months with no problems. I have also done some testing of other drivers to use TabbedDeviceConfig instead of the current widget. They all worked for reading and saving the options. But, as I don't have an appropriate device, I can't do complete tests. I am reasonably confident it works. This was mainly experimenting to make sure I didn't break anything. Most device drivers do not need the extra function provided by these changes. In fact, it is probably only the KOBOTOUCH driver that does. Most of the others either don't have the extra options, or they are simple enough to be handled by the current configuration widgets.

I'm at the point where I need others to comment. The code is in https://github.com/davidfor/calibre.git. Within that, the new code is in:
- devices/kobo/kobotouch_config.py
- devices/kobo/driver.py
- gui2/device_drivers/tabbed_device_config.py

Any comments or suggestions for improvement are welcome. I am sure there are better ways to do some of this.
Attached Thumbnails
Click image for larger version

Name:	KOBOTOUCHConfig-FileFormats.png
Views:	454
Size:	18.8 KB
ID:	147927   Click image for larger version

Name:	KOBOTOUCHConfig-Collections.png
Views:	454
Size:	17.8 KB
ID:	147928   Click image for larger version

Name:	KOBOTOUCHConfig-Metadata.png
Views:	425
Size:	17.2 KB
ID:	147929   Click image for larger version

Name:	KoboTouchExtended-Extra.png
Views:	436
Size:	19.5 KB
ID:	147930  
davidfor is offline   Reply With Quote
Old 04-17-2016, 10:21 AM   #2
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I would glad to use this if it can replace the KoboTouchExtended (if you tell me how). I prefer this organization. Only one question: does it include the template metadata update as KoboUtilities?
Terisa de morgan is offline   Reply With Quote
Advert
Old 04-17-2016, 07:40 PM   #3
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Terisa de morgan View Post
I would glad to use this if it can replace the KoboTouchExtended (if you tell me how).
I should have posted a patch file or something. But, driver.py, comment out "config_widget" and "save_settings". And at line 254, change:

Code:
if opts.extra_customization[self.OPT_MODIFY_CSS]:
to:
Code:
if self.modifying_epub():
Quote:
I prefer this organization.
I thought you would.
Quote:
Only one question: does it include the template metadata update as KoboUtilities?
No. That's actually one of the reasons I finally made the changes. I want to add updating the metadata to the plugin, but I need to add a couple of options when doing it. I decided to clean the configuration up before doing that. But, I'm not sure how much of the "extra" metadata update I will bring over.

As an aside, I've actually been using a plugboard to set the comments when sending books. I just added the comments to the list of "dest_fields" in gui2/preferences/plugboard.py. Then used the template I had defined for the Utilities plugin in plugboard. I have been doing this for a while and haven't had a problem with it. But, I also made sure the template I used was correct and haven't tracked through all the code used to set the comments to see where it might go wrong.
davidfor is offline   Reply With Quote
Old 05-18-2016, 11:42 AM   #4
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
@David,

As I don't use KoboTouchExtended I'll restrict my comments to the first 3 Tabs.

Some general first thoughts:
  • I like the "less cluttered" look.
  • I'm not sure what the rationale is for what's included on each Tab. E.g, is there a reason why Collections/Covers/Uploads are grouped together rather than having a separate Tab for each? Similarly, Metadata/Advanced?
  • Are Recommendations, Previews, Archived books classed as Metadata? When I see the word "Metadata" in calibre, I assume it's referring to data in my calibre library columns.
  • This may be a bit premature if you're only at proof-of-concept stage but, I'll say it anyway If I was a new user wondering what some of these options do, I don't think I'd be any the wiser with the Tabbed display than I was with the old all-in-one display.

More specific thought:
  • Using CollectionsGroupBox as an example - but also applies to CoversGroupBox, MetadataGroupBox:

    The first checkbox, 'Manage Collections', seems to be acting as a "controller" for whether to do anything with the other 3 items below (Columns, Create coll, Delete empty). If I have understood this correctly might it be better to remove it and have this checkbox belong directly to the CollectionsGroupBox parent widget. i.e.
    Code:
    class CollectionsGroupBox(DeviceOptionsGroupBox):
        def __init__(self, parent, device):
            ... ...
            self.setCheckable(True)
            ... ...
    
        @property
        def manage_collections(self):
            return self.isChecked()
    I believe all the child-widgets would be automatically enabled/disabled as the CollectionsGroupBox checkbox was checked/unchecked, removing the need for manage_collections_checkbox_clicked()
    (see screencaps below). This 'run from source' thingy is pretty handy.

Final thought:
  • What are the chances of bringing KoboTouch and KoboTouchExtended together as one driver so that it would be possible to send a batch of epubs as plain-epub or kepub as the whim takes me for this particular batch?
Attached Thumbnails
Click image for larger version

Name:	groupbox_checked.jpg
Views:	422
Size:	28.8 KB
ID:	148737   Click image for larger version

Name:	groupbox_unchecked.jpg
Views:	397
Size:	26.8 KB
ID:	148738  

Last edited by jackie_w; 05-18-2016 at 04:10 PM. Reason: On reflection, I'm not sure that was fair comment
jackie_w is offline   Reply With Quote
Old 05-20-2016, 10:28 PM   #5
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by jackie_w View Post
@David,

As I don't use KoboTouchExtended I'll restrict my comments to the first 3 Tabs.

Some general first thoughts:
  • I like the "less cluttered" look.
  • I'm not sure what the rationale is for what's included on each Tab. E.g, is there a reason why Collections/Covers/Uploads are grouped together rather than having a separate Tab for each? Similarly, Metadata/Advanced?
  • It's basically because there aren't enough options to fill separate tabs. The minimum size dialog is effectively set by the Formats tab. Which groups were on which tab was really about how they fit
    Quote:
  • Are Recommendations, Previews, Archived books classed as Metadata? When I see the word "Metadata" in calibre, I assume it's referring to data in my calibre library columns.
  • No, I hadn't intended the recommendations etc to be "Metadata". That tab probably should be called "Metadata, On Device & Advanced". The name of "Metadata" group isn't quite right, but I'm not sure what it should be.
    Quote:
  • This may be a bit premature if you're only at proof-of-concept stage but, I'll say it anyway If I was a new user wondering what some of these options do, I don't think I'd be any the wiser with the Tabbed display than I was with the old all-in-one display.
I don't completely disagree with you on this. I think this is better and I think it will be easier to make better still.
Quote:
More specific thought:
  • Using CollectionsGroupBox as an example - but also applies to CoversGroupBox, MetadataGroupBox:

    The first checkbox, 'Manage Collections', seems to be acting as a "controller" for whether to do anything with the other 3 items below (Columns, Create coll, Delete empty). If I have understood this correctly might it be better to remove it and have this checkbox belong directly to the CollectionsGroupBox parent widget. i.e.
    Code:
    class CollectionsGroupBox(DeviceOptionsGroupBox):
        def __init__(self, parent, device):
            ... ...
            self.setCheckable(True)
            ... ...
    
        @property
        def manage_collections(self):
            return self.isChecked()
    I believe all the child-widgets would be automatically enabled/disabled as the CollectionsGroupBox checkbox was checked/unchecked, removing the need for manage_collections_checkbox_clicked()
    (see screencaps below).
  • I haven't seen that done in many places, but it seems to work. I'll have to experiment a bit.
    Quote:
    This 'run from source' thingy is pretty handy.
Yes it is.
Quote:
Final thought:
  • What are the chances of bringing KoboTouch and KoboTouchExtended together as one driver so that it would be possible to send a batch of epubs as plain-epub or kepub as the whim takes me for this particular batch?
I'm not keen on including the kepub generation into the main driver. And I normally handle this by converting to kepub and then sending it. But, what I think you want is an option while using the extended driver to either quickly turn the kepub conversion on and off without disconnecting, or a "send as epub without conversion" option in a menu somewhere. I'm not sure if there is a way to handle this just at the device driver level. But, I think it might be something I could do from the utilities plugin, with the appropriate support in the extended driver.

Thanks for all the comments.
davidfor is offline   Reply With Quote
Advert
Old 05-22-2016, 10:21 AM   #6
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I have just committed to my repository the changes as suggested by jackie_w plus a couple of other changes in how the tabs and widgets are managed.

If anyone wants to look at the changes and comment...
davidfor is offline   Reply With Quote
Old 05-22-2016, 12:50 PM   #7
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I'm trying it but I always get this message when I try to configure it:

Spoiler:

calibre, version 2.57.1
ERROR: Excepción no considerada: <b>TypeError</b>:unbound method config_widget() must be called with KOBOTOUCHEXTENDED instance as first argument (got nothing instead)

calibre 2.57.1* [64bit] embedded-python: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.9
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Successfully initialized third party plugins: DeDRM && Fantastic Fiction && Quality Check && Goodreads Sync && GetFileName && Kobo Import && Modify ePub && Count Pages && Ex Libris && Extract ISBN && KoboTouchExtended && Diaps Editing Toolbag && Find Duplicates && iOS reader applications && Generate Cover && Search The Internet && Kobo Utilities && Marvin XD && Sort CSS && Import List && KindleUnpack - The Plugin && Manage Series && Barnes & Noble && Overdrive Link && Obok DeDRM && Update Series Status && Consolidate All Library Metadata && Annotations && Save Composite Custom Columns && Goodreads && SmartEject && Reading List && EpubMerge && Favourites Menu && EpubSplit && View Manager && My Tools && Overdrive Link
Traceback (most recent call last):
File "D:\Lectores\calibre\Codigo\calibre-2.57.1\src\calibre\gui2\preferences\plugins.py", line 292, in customize_plugin
File "D:\Lectores\calibre\Codigo\calibre-2.57.1\src\calibre\gui2\preferences\plugins.py", line 370, in modify_plugin
File "D:\Lectores\calibre\Codigo\calibre-2.57.1\src\calibre\customize\__init__.py", line 154, in do_user_config
File "calibre_plugins.kobotouch_extended.device.driver" , line 148, in config_widget
TypeError: unbound method config_widget() must be called with KOBOTOUCHEXTENDED instance as first argument (got nothing instead)
Terisa de morgan is offline   Reply With Quote
Old 05-22-2016, 01:53 PM   #8
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
@David,

I have my device driver set as your updated standard KOBOTOUCH and I get this error if I try to save a driver config change:
Spoiler:
Code:
Running calibre from source [C:\JS_git_devel\cal\src]

SMART_DEV (   0.98:  0.871) startup_on_demand listening on port 9090
SMART_DEV (   0.99:  0.001) _attach_to_port try ip address "" on port 54982
SMART_DEV (   1.00:  0.000) startup_on_demand broadcast socket listening on port 54982
SMART_DEV (   2.04:  1.034) run All IP addresses {'{B3138E13-B2C6-4260-999A-B513AFDE71DA}': [{'addr': '169.254.48.54'}], '{846EE342-7039-11DE-9D20-806E6F6E6963}': [{'netmask': '255.0.0.0', 'addr': '127.0.0.1', 'broadcast': '127.255.255.255'}], '{72227828-5A67-43D2-BFE6-7620F3F56F3D}': [{'netmask': '255.255.255.0', 'addr': '192.168.0.12', 'broadcast': '192.168.0.255'}], '{5EF38EB0-33CB-4B37-9C73-E74F94812551}': [{'addr': '169.254.156.58'}]}
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 ExtraCustomization.__init__ - extra_customization_message= []
DEBUG:    0.0 ExtraCustomization.__init__ - extra_customization_choices= None
DEBUG:    0.0 ExtraCustomization.__init__ - device_settings.extra_customization= []
DEBUG:    0.0 ExtraCustomization.__init__ - device_settings= <calibre.utils.config_base.OptionValues object at 0x0000000009318080>
DEBUG:    0.0 ExtraCustomization::has_extra_customizations - self.extra_customization_message []
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:   19.5 KOBOTOUCHConfig::commit: start
DEBUG:   19.5 TabbedDeviceConfig::commit: start
DEBUG:   19.5 commit: starting setting=<calibre.utils.config_base.ConfigProxy object at 0x0000000009318208>
DEBUG:   19.5 commit: self.formats.format_map= [u'kepub', u'epub', u'pdf', u'cbz', u'cbr', u'txt']
DEBUG:   19.5 KoboTouch::migrate_old_settings - start
DEBUG:   19.5 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:   19.5 KoboTouch::migrate_old_settings - settings.collections_columns= tags
calibre 2.57.1* [64bit]  embedded-python: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.9
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Successfully initialized third party plugins: DeDRM && KoboBooks && KePub Metadata Reader && KindleUnpack - The Plugin && KePub Metadata Writer && Extract ISBN && Modify ePub && JS Mod Epub && KePub Output && ScrambleEbook && Open With && Kobo Utilities && DOC Input && KePub Input && Obok DeDRM && JSTest Plugin && Goodreads && Fantastic Fiction && Search The Internet && Diaps Editing Toolbag && Quality Check && Wiki Reader && Copy Cover To Device && EpubSplit && Epub2Kepub && Barnes & Noble && Count Pages
Traceback (most recent call last):
  File "C:\JS_git_devel\cal\src\calibre\gui2\preferences\plugins.py", line 292, in customize_plugin
  File "C:\JS_git_devel\cal\src\calibre\gui2\preferences\plugins.py", line 370, in modify_plugin
  File "C:\JS_git_devel\cal\src\calibre\customize\__init__.py", line 173, in do_user_config
  File "C:\JS_git_devel\cal\src\calibre\devices\kobo\driver.py", line 2790, in save_settings
  File "C:\JS_git_devel\cal\src\calibre\devices\kobo\kobotouch_config.py", line 99, in commit
  File "C:\JS_git_devel\cal\src\calibre\gui2\device_drivers\tabbed_device_config.py", line 224, in commit
  File "C:\JS_git_devel\cal\src\calibre\devices\kobo\driver.py", line 165, in prefs
  File "C:\JS_git_devel\cal\src\calibre\utils\config.py", line 408, in __setitem__
  File "C:\JS_git_devel\cal\src\calibre\utils\config.py", line 353, in commit
  File "C:\JS_git_devel\cal\src\calibre\utils\config.py", line 392, in to_raw
  File "json\__init__.py", line 250, in dumps
  File "json\encoder.py", line 209, in encode
  File "json\encoder.py", line 434, in _iterencode
  File "json\encoder.py", line 408, in _iterencode_dict
  File "json\encoder.py", line 442, in _iterencode
  File "C:\JS_git_devel\cal\src\calibre\utils\config.py", line 373, in to_json
TypeError: <calibre.utils.config_base.OptionValues object at 0x0000000009318860> is not JSON serializable
jackie_w is offline   Reply With Quote
Old 05-22-2016, 08:11 PM   #9
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Terisa de morgan View Post
I'm trying it but I always get this message when I try to configure it:
The extended driver has been updated in the last week or so. You need to make the changes I suggested a few posts up. I'll try and remember to create a version that works with both KoboTouch drivers tonight.
davidfor is offline   Reply With Quote
Old 05-22-2016, 08:27 PM   #10
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by jackie_w View Post
@David,

I have my device driver set as your updated standard KOBOTOUCH and I get this error if I try to save a driver config change:
Spoiler:
Code:
Running calibre from source [C:\JS_git_devel\cal\src]

SMART_DEV (   0.98:  0.871) startup_on_demand listening on port 9090
SMART_DEV (   0.99:  0.001) _attach_to_port try ip address "" on port 54982
SMART_DEV (   1.00:  0.000) startup_on_demand broadcast socket listening on port 54982
SMART_DEV (   2.04:  1.034) run All IP addresses {'{B3138E13-B2C6-4260-999A-B513AFDE71DA}': [{'addr': '169.254.48.54'}], '{846EE342-7039-11DE-9D20-806E6F6E6963}': [{'netmask': '255.0.0.0', 'addr': '127.0.0.1', 'broadcast': '127.255.255.255'}], '{72227828-5A67-43D2-BFE6-7620F3F56F3D}': [{'netmask': '255.255.255.0', 'addr': '192.168.0.12', 'broadcast': '192.168.0.255'}], '{5EF38EB0-33CB-4B37-9C73-E74F94812551}': [{'addr': '169.254.156.58'}]}
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 ExtraCustomization.__init__ - extra_customization_message= []
DEBUG:    0.0 ExtraCustomization.__init__ - extra_customization_choices= None
DEBUG:    0.0 ExtraCustomization.__init__ - device_settings.extra_customization= []
DEBUG:    0.0 ExtraCustomization.__init__ - device_settings= <calibre.utils.config_base.OptionValues object at 0x0000000009318080>
DEBUG:    0.0 ExtraCustomization::has_extra_customizations - self.extra_customization_message []
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:    0.0 KoboTouch::migrate_old_settings - start
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:    0.0 KoboTouch::migrate_old_settings - settings.collections_columns= tags
DEBUG:   19.5 KOBOTOUCHConfig::commit: start
DEBUG:   19.5 TabbedDeviceConfig::commit: start
DEBUG:   19.5 commit: starting setting=<calibre.utils.config_base.ConfigProxy object at 0x0000000009318208>
DEBUG:   19.5 commit: self.formats.format_map= [u'kepub', u'epub', u'pdf', u'cbz', u'cbr', u'txt']
DEBUG:   19.5 KoboTouch::migrate_old_settings - start
DEBUG:   19.5 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG:   19.5 KoboTouch::migrate_old_settings - settings.collections_columns= tags
calibre 2.57.1* [64bit]  embedded-python: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.9
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Successfully initialized third party plugins: DeDRM && KoboBooks && KePub Metadata Reader && KindleUnpack - The Plugin && KePub Metadata Writer && Extract ISBN && Modify ePub && JS Mod Epub && KePub Output && ScrambleEbook && Open With && Kobo Utilities && DOC Input && KePub Input && Obok DeDRM && JSTest Plugin && Goodreads && Fantastic Fiction && Search The Internet && Diaps Editing Toolbag && Quality Check && Wiki Reader && Copy Cover To Device && EpubSplit && Epub2Kepub && Barnes & Noble && Count Pages
Traceback (most recent call last):
  File "C:\JS_git_devel\cal\src\calibre\gui2\preferences\plugins.py", line 292, in customize_plugin
  File "C:\JS_git_devel\cal\src\calibre\gui2\preferences\plugins.py", line 370, in modify_plugin
  File "C:\JS_git_devel\cal\src\calibre\customize\__init__.py", line 173, in do_user_config
  File "C:\JS_git_devel\cal\src\calibre\devices\kobo\driver.py", line 2790, in save_settings
  File "C:\JS_git_devel\cal\src\calibre\devices\kobo\kobotouch_config.py", line 99, in commit
  File "C:\JS_git_devel\cal\src\calibre\gui2\device_drivers\tabbed_device_config.py", line 224, in commit
  File "C:\JS_git_devel\cal\src\calibre\devices\kobo\driver.py", line 165, in prefs
  File "C:\JS_git_devel\cal\src\calibre\utils\config.py", line 408, in __setitem__
  File "C:\JS_git_devel\cal\src\calibre\utils\config.py", line 353, in commit
  File "C:\JS_git_devel\cal\src\calibre\utils\config.py", line 392, in to_raw
  File "json\__init__.py", line 250, in dumps
  File "json\encoder.py", line 209, in encode
  File "json\encoder.py", line 434, in _iterencode
  File "json\encoder.py", line 408, in _iterencode_dict
  File "json\encoder.py", line 442, in _iterencode
  File "C:\JS_git_devel\cal\src\calibre\utils\config.py", line 373, in to_json
TypeError: <calibre.utils.config_base.OptionValues object at 0x0000000009318860> is not JSON serializable
I think I might have broken something in the migration of the old settings. I didn't recheck this last night and was working with an already migrated settings file. Could you removed the file "device_drivers_KOBOTOUCH.py" in your calibre configuration directory and try again?
davidfor is offline   Reply With Quote
Old 05-23-2016, 08:18 AM   #11
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by davidfor View Post
I think I might have broken something in the migration of the old settings. I didn't recheck this last night and was working with an already migrated settings file. Could you removed the file "device_drivers_KOBOTOUCH.py" in your calibre configuration directory and try again?
I did as you asked. In case it's relevant, before starting I also removed from my config directory:
- device_drivers_KOBO.py
- device_drivers_KOBOTOUCHCSSEDIT.py (the driver for my subclassed KOBOTOUCH)

I'm still getting an error. This is the complete log from calibre startup to failing to save the config:
Spoiler:

Code:
*** Hello, Jackie! ***
Running calibre from source [C:\JS_git_devel\cal\src]

calibre 2.57.1* [64bit]  embedded-python: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.9
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Successfully initialized third party plugins: DeDRM && DOC Input && Obok DeDRM && Goodreads && KoboBooks && Diaps Editing Toolbag && JS Mod Epub && JSTest Plugin && KePub Input && Modify ePub && Open With && KePub Output && KindleUnpack - The Plugin && Barnes & Noble && Extract ISBN && KePub Metadata Reader && Epub2Kepub && Wiki Reader && ScrambleEbook && Kobo Utilities && Quality Check && Search The Internet && Fantastic Fiction && EpubSplit && KePub Metadata Writer && Count Pages && Copy Cover To Device
Starting up...
DEBUG:    0.0 obok::utilities.py - loading translations
DEBUG:    0.0 obok::dialogs.py - loading translations
DEBUG:    0.0 obok::config.py - loading translations
DEBUG:    0.0 obok::action_err.py - loading translations
cssutils 1.0
lxml etree: 3.3.5
cssutils 1.0
lxml etree: 3.3.5
DEBUG:    0.0 KoboUtilites::action.py - loading translations
DEBUG:    0.0 KoboUtilites::dialogs.py - loading translations
DEBUG:    0.0 KoboUtilites::action.py - loading translations
DEBUG:    2.5 No Kobo Touch, Glo or Mini appears to be connected
DEBUG:    2.5 rebuild_menus - self.supports_ratings=None, self.supports_tiles=None
DEBUG:    2.5 KoboUtilities:set_toolbar_button_tooltip - start: text='None'
DEBUG:    2.5 device_driver_name - could not load extended driver. Exception= No module named kobotouch_extended.device.driver
DEBUG:    2.5 KoboUtilities:set_toolbar_button_tooltip - setting to text='Utilities to use with Kobo ereaders

Driver: KoboTouch'
Started up in 3.52 seconds with 106 books
SMART_DEV (   0.00:  0.004) _attach_to_port try ip address "" on port 9090

*** Hello, Jackie! ***
Running calibre from source [C:\JS_git_devel\cal\src]

SMART_DEV (   1.15:  1.040) startup_on_demand listening on port 9090
SMART_DEV (   1.16:  0.001) _attach_to_port try ip address "" on port 54982
SMART_DEV (   1.17:  0.001) startup_on_demand broadcast socket listening on port 54982
SMART_DEV (   2.20:  1.018) run All IP addresses {'{72227828-5A67-43D2-BFE6-7620F3F56F3D}': [{'broadcast': '192.168.0.255', 'addr': '192.168.0.12', 'netmask': '255.255.255.0'}], '{846EE342-7039-11DE-9D20-806E6F6E6963}': [{'broadcast': '127.255.255.255', 'addr': '127.0.0.1', 'netmask': '255.0.0.0'}], '{B3138E13-B2C6-4260-999A-B513AFDE71DA}': [{'addr': '169.254.48.54'}], '{5EF38EB0-33CB-4B37-9C73-E74F94812551}': [{'addr': '169.254.156.58'}]}
DEBUG:    0.0 ExtraCustomization.__init__ - extra_customization_message= []
DEBUG:    0.0 ExtraCustomization.__init__ - extra_customization_choices= None
DEBUG:    0.0 ExtraCustomization.__init__ - device_settings.extra_customization= []
DEBUG:    0.0 ExtraCustomization.__init__ - device_settings= <calibre.utils.config_base.OptionValues object at 0x000000001268CB00>
DEBUG:    0.0 ExtraCustomization::has_extra_customizations - self.extra_customization_message []
DEBUG:   39.3 KOBOTOUCHConfig::commit: start
DEBUG:   39.3 TabbedDeviceConfig::commit: start
DEBUG:   39.4 commit: starting setting=<calibre.utils.config_base.ConfigProxy object at 0x000000001268CA58>
DEBUG:   39.4 commit: self.formats.format_map= [u'kepub', u'epub', u'pdf', u'txt', u'cbz', u'cbr']
DEBUG:   39.4 KoboTouch::migrate_old_settings - start
calibre 2.57.1* [64bit]  embedded-python: True is64bit: True
Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.9
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Successfully initialized third party plugins: DeDRM && DOC Input && Obok DeDRM && Goodreads && KoboBooks && Diaps Editing Toolbag && JS Mod Epub && JSTest Plugin && KePub Input && Modify ePub && Open With && KePub Output && KindleUnpack - The Plugin && Barnes & Noble && Extract ISBN && KePub Metadata Reader && Epub2Kepub && Wiki Reader && ScrambleEbook && Kobo Utilities && Quality Check && Search The Internet && Fantastic Fiction && EpubSplit && KePub Metadata Writer && Count Pages && Copy Cover To Device
Traceback (most recent call last):
  File "C:\JS_git_devel\cal\src\calibre\gui2\preferences\plugins.py", line 292, in customize_plugin
  File "C:\JS_git_devel\cal\src\calibre\gui2\preferences\plugins.py", line 370, in modify_plugin
  File "C:\JS_git_devel\cal\src\calibre\customize\__init__.py", line 173, in do_user_config
  File "C:\JS_git_devel\cal\src\calibre\devices\kobo\driver.py", line 2790, in save_settings
  File "C:\JS_git_devel\cal\src\calibre\devices\kobo\kobotouch_config.py", line 99, in commit
  File "C:\JS_git_devel\cal\src\calibre\gui2\device_drivers\tabbed_device_config.py", line 224, in commit
  File "C:\JS_git_devel\cal\src\calibre\devices\kobo\driver.py", line 165, in prefs
  File "C:\JS_git_devel\cal\src\calibre\utils\config.py", line 408, in __setitem__
  File "C:\JS_git_devel\cal\src\calibre\utils\config.py", line 353, in commit
  File "C:\JS_git_devel\cal\src\calibre\utils\config.py", line 392, in to_raw
  File "json\__init__.py", line 250, in dumps
  File "json\encoder.py", line 209, in encode
  File "json\encoder.py", line 434, in _iterencode
  File "json\encoder.py", line 408, in _iterencode_dict
  File "json\encoder.py", line 442, in _iterencode
  File "C:\JS_git_devel\cal\src\calibre\utils\config.py", line 373, in to_json
TypeError: <calibre.utils.config_base.OptionValues object at 0x00000000090AA320> is not JSON serializable

Is there something else I should have disabled or deleted before starting?

ETA: Just in case removing device_drivers_KOBO.py wasn't a very smart thing to do, I put it back, restarted calibre and re-ran the test. Still the same error
Code:
TypeError: <calibre.utils.config_base.OptionValues object at 0x...> is not JSON serializable
ETA2: I've just thought of something else. When I tried your original Tabbed Config (May 18) I don't think I even attempted to save the config. So it's quite possible that, whatever the problem is today, it also existed then.

Last edited by jackie_w; 05-23-2016 at 08:57 AM. Reason: ETA2
jackie_w is offline   Reply With Quote
Old 05-23-2016, 10:32 AM   #12
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by jackie_w View Post
ETA2: I've just thought of something else. When I tried your original Tabbed Config (May 18) I don't think I even attempted to save the config. So it's quite possible that, whatever the problem is today, it also existed then.
OK, that's it. I have a couple of lines left from my first attempt at this. This put the options in a different file after migrating the old settings. That means it's broken for everyone but me.

I'll have to look at that code again to work out what I was intending. In the meantime, you can get past this by creating a file called KoboTouch_devices.json in the calibre configuration directory. The contents needs to be:

Code:
{
  "KoboTouch": {
  }
}
davidfor is offline   Reply With Quote
Old 05-24-2016, 02:52 PM   #13
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
FYI. I noticed that the file KoboTouch_devices.json was already in the config directory, dated May 18, but it was empty. After adding the content you specified above there were no errors when I did a Save Config.

I did observe that if I made a config change and saved, although there were no errors the contents of KoboTouch_devices.json did not change. Is this what you would expect?
jackie_w is offline   Reply With Quote
Old 05-24-2016, 07:57 PM   #14
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Yes, that's what I should have expected.

The problem was that when I started this, I pulled code from the MTP driver and it's configuration dialog. It handles the configuration at the actual device level rather than one set for the driver. I had a look at doing this for the Kobo driver, but, it broke to much. The parent classes all assume the single configuration and overriding that was more work than I wanted at the time. I thought I had removed all this code, but, I had missed this one bit.

Everything else would have been working properly. This was just a check being done when saving configuration against the current configuration to prevent unnecessary writes. But, it wasn't checking against the correct saved configuration. Putting the null configuration in means that the checks always come as as a change happened, and the correct configuration is saved in the right place.

I fixed this last night, but haven't checked it in yet. I'll do it tonight after some more testing.
davidfor is offline   Reply With Quote
Old 05-25-2016, 09:08 AM   #15
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I'm happy with those changes and have checked them in. The configuration should work without the KoboTouch_devices.json existing. Tell me how it goes.
davidfor is offline   Reply With Quote
Reply

Tags
configuration, drivers, kobo


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle 4NT tabbed browsing fix attempt ghudod Kindle Developer's Corner 36 01-08-2013 02:24 PM
tabbed browsing rbrohman Kindle Developer's Corner 6 02-19-2011 06:10 PM
Format tabbed text columns, NOT flowing Hitch Sigil 19 06-09-2010 07:58 PM
Grassroots works! MS IE to do "tabbed browsing" Alexander Turcic Lounge 1 06-10-2005 11:12 AM


All times are GMT -4. The time now is 08:11 AM.


MobileRead.com is a privately owned, operated and funded community.