Mobileread
[Device Plugin] Kobo Touch Extended Driver
#1881  Doug001 06-22-2019, 03:05 PM
Hi,

I am having Plugin problem which David Koval has kindly advised starts with this Plugin.

Here is the original error information:

calibre, version 3.44.0
ERROR: Error: Error communicating with device

'bool' object has no attribute 'startswith'

Traceback (most recent call last):
File "site-packages/calibre/gui2/device.py", line 89, in run
File "site-packages/calibre/gui2/device.py", line 593, in _upload_books
File "calibre_plugins.kobotouch_extended.device.driver" , line 399, in upload_books
File "site-packages/calibre/devices/kobo/driver.py", line 2087, in upload_books
File "calibre_plugins.kobotouch_extended.device.driver" , line 313, in _modify_epub
File "lib/python2.7/posixpath.py", line 254, in expanduser
AttributeError: 'bool' object has no attribute 'startswith'


And here is what I get when I try to customize the Plugin:

calibre, version 3.44.0
ERROR: Unhandled exception: <b>TypeError</b>:QLineEdit.setText(): argument 1 has unexpected type 'bool'

calibre 3.44 embedded-python: True is64bit: True
Darwin-18.6.0-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '18.6.0', 'Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64')
Python 2.7.15
OSX: ('10.14.5', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: DeDRM (6, 0, 9) && Kindle and Mobipocket DeDRM (0, 4, 13) && KoboTouchExtended (3, 1, 3) && Kobo Utilities (2, 8, 0) && Manage Series (1, 2, 8) && KoboBooks (1, 0, 0)
Traceback (most recent call last):
File "site-packages/calibre/gui2/preferences/plugins.py", line 294, in customize_plugin
File "site-packages/calibre/gui2/preferences/plugins.py", line 372, in modify_plugin
File "site-packages/calibre/customize/__init__.py", line 156, in do_user_config
File "calibre_plugins.kobotouch_extended.device.driver" , line 157, in config_widget
File "calibre_plugins.kobotouch_extended.device.koboext ended_config", line 61, in __init__
File "calibre_plugins.kobotouch_extended.device.koboext ended_config", line 92, in __init__
File "calibre_plugins.kobotouch_extended.device.koboext ended_config", line 178, in __init__
TypeError: QLineEdit.setText(): argument 1 has unexpected type 'bool'


If someone wants me to go in and edit something I would happily try -- but I do not know where the file code lives so would need some fairly introductory information about how to get to that point.

Thank you for any help you are able to provide!

Doug
Reply 

#1882  smiley1081 06-22-2019, 04:58 PM
Quote davidfor
In calibre, open the preferences and go to the "Miscellaneous" page. Then click the appropriate button.
Switching from the Italian locale back to the English locale helped.

A lot.

Thanks, also to @theducks.
Reply 

#1883  davidfor 06-22-2019, 11:10 PM
Quote Doug001
Hi,

I am having Plugin problem which David Koval has kindly advised starts with this Plugin.

Here is the original error information:

calibre, version 3.44.0
ERROR: Error: Error communicating with device

'bool' object has no attribute 'startswith'

Traceback (most recent call last):
File "site-packages/calibre/gui2/device.py", line 89, in run
File "site-packages/calibre/gui2/device.py", line 593, in _upload_books
File "calibre_plugins.kobotouch_extended.device.driver" , line 399, in upload_books
File "site-packages/calibre/devices/kobo/driver.py", line 2087, in upload_books
File "calibre_plugins.kobotouch_extended.device.driver" , line 313, in _modify_epub
File "lib/python2.7/posixpath.py", line 254, in expanduser
AttributeError: 'bool' object has no attribute 'startswith'


And here is what I get when I try to customize the Plugin:

calibre, version 3.44.0
ERROR: Unhandled exception: <b>TypeError</b>:QLineEdit.setText(): argument 1 has unexpected type 'bool'

calibre 3.44 embedded-python: True is64bit: True
Darwin-18.6.0-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '18.6.0', 'Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64')
Python 2.7.15
OSX: ('10.14.5', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: DeDRM (6, 0, 9) && Kindle and Mobipocket DeDRM (0, 4, 13) && KoboTouchExtended (3, 1, 3) && Kobo Utilities (2, 8, 0) && Manage Series (1, 2, 8) && KoboBooks (1, 0, 0)
Traceback (most recent call last):
File "site-packages/calibre/gui2/preferences/plugins.py", line 294, in customize_plugin
File "site-packages/calibre/gui2/preferences/plugins.py", line 372, in modify_plugin
File "site-packages/calibre/customize/__init__.py", line 156, in do_user_config
File "calibre_plugins.kobotouch_extended.device.driver" , line 157, in config_widget
File "calibre_plugins.kobotouch_extended.device.koboext ended_config", line 61, in __init__
File "calibre_plugins.kobotouch_extended.device.koboext ended_config", line 92, in __init__
File "calibre_plugins.kobotouch_extended.device.koboext ended_config", line 178, in __init__
TypeError: QLineEdit.setText(): argument 1 has unexpected type 'bool'


If someone wants me to go in and edit something I would happily try -- but I do not know where the file code lives so would need some fairly introductory information about how to get to that point.

Thank you for any help you are able to provide!
This is the same problem that has been discussed several times recently. Please see my post above for how to fix it.
Reply 

#1884  davidfor 06-22-2019, 11:11 PM
Quote smiley1081
Switching from the Italian locale back to the English locale helped.

A lot.
Do you mean it helped find the button I was pointing to? Or did it get rid of the problem you were seeing?
Reply 

#1885  davidfor 07-13-2019, 12:18 AM
Attached is a beta that should fix the problems reported with opening the driver configuration or sending books. The error is in how the options are migrated between versions of the plugins. A change in how calibre stores the configuration seems to have exacerbated the problem. This version should fix the issue.

If anyone stills sees the error with this, please post the "device_drivers_KOBOTOUCHBETA.py" and "device_drivers_KOBOTOUCHEXTENDED.py.json" from the calibre configuration directory. These are the before and after versions of the configuration file. And I would be interested in seeing what the last changed timestamp of the "device_drivers_KOBOTOUCHBETA.py" is.
Reply 

#1886  jgoguen 07-13-2019, 12:44 AM
Can you make a PR against the GitHub repo, or send me a patch file for the change? It's been working fine for me when I've tried (but not always removing the option from the config file) but maybe that's the options I have set? I'm out of the country for a while but I can make a new release once I'm back.
Reply 

#1887  davidfor 07-14-2019, 01:43 AM
Here's the patch file. I have checked the change using a very old config file from @snowstone. It migrates properly.

Note, in doing this I found a problem with 3.45.2 and migrating old config files to the JSON version. I had to do the testing with 3.44 to prove it was done correctly.
[txt] configfix.patch.txt (4.5 KB, 50 views)
Reply 

#1888  snowstone 07-14-2019, 05:31 AM
Quote davidfor
Here's the patch file. I have checked the change using a very old config file from @snowstone. It migrates properly.

Note, in doing this I found a problem with 3.45.2 and migrating old config files to the JSON version. I had to do the testing with 3.44 to prove it was done correctly.
How to I install this patch file? Or the previous plugin zip file will do the trick?
Reply 

#1889  davidfor 07-14-2019, 06:59 AM
Quote snowstone
How to I install this patch file? Or the previous plugin zip file will do the trick?
The patch is for @jgoguen to merge into the source. The changes are already in the beta I posted above.
Reply 

#1890  jgoguen 07-15-2019, 06:00 PM
I've published a new version with davidfor's changes, calibre should pick it up in the next couple hours.
Reply 

 « First  « Prev Next »  Last »  (189/195)
Today's Posts | Search this Thread | Login | Register