Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-20-2020, 01:42 PM   #2101
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: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Message content deleted. Jon's been chastised already.

Note to self: always read to the end of the thread before replying....
DNSB is offline   Reply With Quote
Old 05-22-2020, 08:20 PM   #2102
bigbadworf
Junior Member
bigbadworf began at the beginning.
 
Posts: 1
Karma: 10
Join Date: May 2020
Device: Kobo Clara HD
Line breaks in epub conversion

Hey, sorry to bring this up but the newest version introduces line breaks into (at least one) epub when converting to kepub that the old version doesn't. Having switched back to 3.1.5 the conversion works flawlessly again. I honestly can't remember if I configured it at all apart from just installing at this point though.

Sorry to be the bearer. Actually 3.1.5 works perfectly for me in new calibre anyway. What's the need of the update?
bigbadworf is offline   Reply With Quote
Old 05-22-2020, 08:36 PM   #2103
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: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by bigbadworf View Post
Hey, sorry to bring this up but the newest version introduces line breaks into (at least one) epub when converting to kepub that the old version doesn't. Having switched back to 3.1.5 the conversion works flawlessly again. I honestly can't remember if I configured it at all apart from just installing at this point though.

Sorry to be the bearer. Actually 3.1.5 works perfectly for me in new calibre anyway. What's the need of the update?
Is this the same convert a <br/> to a <br/></p> and then adding a <p> before the </p> that originally ended the paragraph bug?
DNSB is offline   Reply With Quote
Old 05-24-2020, 04:59 PM   #2104
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,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
@jgoguen, @davidfor,

In the forced_cleanup method of your container.py file, have you considered letting calibre do the hard work using it's standard Beautify function?
Code:
from calibre.ebooks.oeb.polish.pretty import pretty_all
pretty_all(container)
I don't know whether it will fix your current <br/> problem but in my own plugins I've generally found it a more reliable option than regex when trying to sort out things like self-closing tags. It might even fix the encoding stuff at the same time.
jackie_w is offline   Reply With Quote
Old 05-24-2020, 08:52 PM   #2105
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,905
Karma: 47303824
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
@jgoguen, @davidfor,

In the forced_cleanup method of your container.py file, have you considered letting calibre do the hard work using it's standard Beautify function?
Code:
from calibre.ebooks.oeb.polish.pretty import pretty_all
pretty_all(container)
I don't know whether it will fix your current <br/> problem but in my own plugins I've generally found it a more reliable option than regex when trying to sort out things like self-closing tags. It might even fix the encoding stuff at the same time.
I'll have to leave that to @jgoguen. I'm not sure if his intention was to minimize the changes made to the book code, or because he didn't like what the prettty_all did. Things might have changed since this was written, so, I don't know.

I did look at it, and it appears to be one of the regex's in that method. The problem has probably been there for a while, but, the change for Python 3 have exposed it. I have attached a beta that seems to fix it. The same problem is in the output plugin, but, I'll wait for any comments about the driver before doing anything there.
Attached Files
File Type: zip KoboTouchExtended-beta.zip (34.0 KB, 272 views)
davidfor is offline   Reply With Quote
Old 05-24-2020, 10:30 PM   #2106
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: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by davidfor View Post
I did look at it, and it appears to be one of the regex's in that method. The problem has probably been there for a while, but, the change for Python 3 have exposed it. I have attached a beta that seems to fix it. The same problem is in the output plugin, but, I'll wait for any comments about the driver before doing anything there.
Quick check using 4 epubs with masses of <br/> including the Jack Vance novel posted here by Selenia and the issue seems to have been fixed.
DNSB is offline   Reply With Quote
Old 05-25-2020, 03:47 PM   #2107
Selenia
Member
Selenia began at the beginning.
 
Posts: 16
Karma: 10
Join Date: May 2020
Device: Kobo Aura One
Quote:
Originally Posted by DNSB View Post
Quick check using 4 epubs with masses of <br/> including the Jack Vance novel posted here by Selenia and the issue seems to have been fixed.
I have tried that one and another one as well and they seem allright to me with the beta version, both have problems with 3.2.7.
Selenia is offline   Reply With Quote
Old 05-25-2020, 04:06 PM   #2108
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Selenia View Post
I have tried that one and another one as well and they seem allright to me with the beta version, both have problems with 3.2.7.
Are you saying that you are running Calibre 3.2.7? If you cannot run Calibre 4.x, you should be running 3.4.8 is you are running 3.2.7.
JSWolf is offline   Reply With Quote
Old 05-25-2020, 06:00 PM   #2109
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: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
Are you saying that you are running Calibre 3.2.7? If you cannot run Calibre 4.x, you should be running 3.4.8 is you are running 3.2.7.
KoboTouchExtended driver version 3.2.7 is what was being referred to. It was posted back in message #2080 by jgoguen. In previous messages, Selinia mentioned using calibere 4.1.6 and KoboTouchExtended 3.2.7.
DNSB is offline   Reply With Quote
Old 05-26-2020, 10:35 AM   #2110
madhatta
Junior Member
madhatta began at the beginning.
 
madhatta's Avatar
 
Posts: 6
Karma: 10
Join Date: May 2020
Device: Kobo Touch
Before I start giving python error output and the like, I thought I'd ask if I should expect problems with my setup. I'm running Calibre 4.13.0 on Fedora 32, and trying to use KoboTouchExtended 3.2.7 from the standard new plugins dialogue. Is this combination expected to work? Is it expected to work, but requires a later version of the plugin to be installed from a zipfile?

Thanks for any light anyone can shed!
madhatta is offline   Reply With Quote
Old 05-26-2020, 11:15 AM   #2111
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,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by madhatta View Post
Before I start giving python error output and the like, I thought I'd ask if I should expect problems with my setup. I'm running Calibre 4.13.0 on Fedora 32, and trying to use KoboTouchExtended 3.2.7 from the standard new plugins dialogue. Is this combination expected to work? Is it expected to work, but requires a later version of the plugin to be installed from a zipfile?

Thanks for any light anyone can shed!
I would expect that to work. The problems have been on Windows.
davidfor is offline   Reply With Quote
Old 05-26-2020, 11:34 AM   #2112
madhatta
Junior Member
madhatta began at the beginning.
 
madhatta's Avatar
 
Posts: 6
Karma: 10
Join Date: May 2020
Device: Kobo Touch
Quote:
Originally Posted by davidfor View Post
I would expect that to work. The problems have been on Windows.
Thank you so much for that! In that case, I'm getting a lot of errors like

calibre 4.13 embedded-python: False is64bit: True
Linux-5.5.10-100.fc30.x86_64-x86_64-with-glibc2.2.5 Linux ('64bit', 'ELF')
('Linux', '5.5.10-100.fc30.x86_64', '#1 SMP Wed Mar 18 14:34:46 UTC 2020')
Python 3.8.2
Interface language: en_GB
Successfully initialized third party plugins: KoboTouchExtended (3, 2, 9) && Obok DeDRM (6, 7, 0)
Traceback (most recent call last):
File "/usr/lib64/calibre/calibre/gui2/device.py", line 1280, in dispatch_sync_event
self.sync_to_device(on_card, delete, fmt)
File "/usr/lib64/calibre/calibre/gui2/device.py", line 1474, in sync_to_device
settings = self.device_manager.device.settings()
File "calibre_plugins.kobotouch_extended.device.driver" , line 118, in settings
File "calibre_plugins.kobotouch_extended.common", line 110, in print_formatted_log
File "calibre_plugins.kobotouch_extended.common", line 91, in _tag_args
File "/usr/lib64/calibre/calibre/__init__.py", line 211, in prints
file.write(end)
TypeError: string argument expected, got 'bytes'


and content doesn't make it down the cable onto my Kobo until I remove the plugin.
madhatta is offline   Reply With Quote
Old 05-26-2020, 11:46 AM   #2113
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by madhatta View Post
Before I start giving python error output and the like, I thought I'd ask if I should expect problems with my setup. I'm running Calibre 4.13.0 on Fedora 32, and trying to use KoboTouchExtended 3.2.7 from the standard new plugins dialogue. Is this combination expected to work? Is it expected to work, but requires a later version of the plugin to be installed from a zipfile?

Thanks for any light anyone can shed!
Did you download Calibre from the Calibre website or the repository? I;ve read of many problems downloading from the repository. In any case, I suggest going to the Calibre website and downloading 4.17 (current version) and then trying again to see what happens.

Last edited by JSWolf; 05-26-2020 at 11:49 AM.
JSWolf is offline   Reply With Quote
Old 05-26-2020, 03:07 PM   #2114
madhatta
Junior Member
madhatta began at the beginning.
 
madhatta's Avatar
 
Posts: 6
Karma: 10
Join Date: May 2020
Device: Kobo Touch
It's the calibre in the distro. I take your point, but I had no issues with the in-distro calibre, including with custom plugins, until loading KoboTouchExtended, and the error message does suggest (to my untrained eye, at least) that the problem is with this plugin.

If you can guide me to a specific issue with the in-Fedora calibre, I will happily log a bugzilla issue for that; but until then I'm unwilling to take on-board the maintenance issue of keeping my apps manually at the latest upstream versions.
madhatta is offline   Reply With Quote
Old 05-26-2020, 03:19 PM   #2115
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: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by madhatta View Post
It's the calibre in the distro. I take your point, but I had no issues with the in-distro calibre, including with custom plugins, until loading KoboTouchExtended, and the error message does suggest (to my untrained eye, at least) that the problem is with this plugin.

If you can guide me to a specific issue with the in-Fedora calibre, I will happily log a bugzilla issue for that; but until then I'm unwilling to take on-board the maintenance issue of keeping my apps manually at the latest upstream versions.
A quick glance suggests the problem is that calibre 4 is Python 2 and you are running it with Python 3.8.2 which is not a good idea. calibre is moving to Python3 but it's not there yet.

As for updating? Calibre gives me a notification when a new version is available. At that time I run the shell script where I copied/pasted the download/install code from the calibre Linux download page. Takes a minute and I'm up to date.

I had to rename the script to calibre_install.sh.txt since MobileRead doesn't allow attaching a .sh file.

If you've tried installing the 3.2.9 beta in message #2106 and it still errors out, you will need to wait for the next release to try again.

OTOH, you can continue with your current setup. Just don't complain when you run into issues trying to run code that has not yet been updated for Python3.
Attached Files
File Type: txt calibre_install.sh.txt (100 Bytes, 176 views)

Last edited by DNSB; 05-26-2020 at 03:22 PM.
DNSB is offline   Reply With Quote
Reply

Tags
error, kobo aura one


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kobo Device Driver Update davidfor Devices 284 05-24-2019 05:24 PM
[Device Plugin] Kindle 2, 3, 4, Touch Device Interface MBP Update Mod cryzed Plugins 7 10-28-2012 04:58 PM
[Device Interface Plugin] Update for Nook Color Driver jmricker Plugins 0 10-22-2011 10:11 AM
Touch Kobo Touch Extended 2 Year Warranty - Is it worth the $34.99? EverC Kobo Reader 11 08-31-2011 11:47 PM
Touch Kobo Touch Extended Warranty Program SensualPoet Kobo Reader 1 07-17-2011 04:08 AM


All times are GMT -4. The time now is 02:05 PM.


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