Mobileread
epub to asw3: wrong internal links
#1  sewi_rafal 02-11-2020, 06:05 AM
I'm converting a epub file to asw3 for Kindle PW using Calibre v. 4.99.4.
The problem is that when looking at the formats in edit book window from epub I have:

Code
...
<a href="part0000_split_015.html#a">Chapter 1</a><br class="calibre2"/>
<a href="part0000_split_026.html#b">Chapter 2</a><br class="calibre2"/>
<a href="part0000_split_027.html#c">Chapter 3</a><br class="calibre2"/>
<a href="part0000_split_027.html#d">Chapter 4</a><br class="calibre2"/>
<a href="part0000_split_029.html#e">Chapter 5</a><br class="calibre2"/>
...
while in the converted asw3 I get broken internal links. Looking at the debugging processed text parts, the links are correct, whereas in the final aws3 file, the links get corrupted. Any idea where is the issue?

- fragment from asw3 file in edit book window:
Code
...
<a href="part0000.html#1-64ba2faa11d04ddca7487a72e9ffd7df">Chapter 1</a><br class="calibre2"/>
<a href="part0000.html#1-64ba2faa11d04ddca7487a72e9ffd7df">Chapter 2</a><br class="calibre2"/>
<a href="part0000.html#1-64ba2faa11d04ddca7487a72e9ffd7df">Chapter 3</a><br class="calibre2"/>
<a href="part0000.html#1-64ba2faa11d04ddca7487a72e9ffd7df">Chapter 4</a><br class="calibre2"/>
<a href="part0000.html#1-64ba2faa11d04ddca7487a72e9ffd7df">Chapter 5</a><br class="calibre2"/>
...
Reply 

#2  kovidgoyal 02-11-2020, 08:00 AM
https://www.mobileread.com/forums/sh...d.php?t=186697
Reply 

#3  sewi_rafal 02-13-2020, 02:46 PM
I filed a bug as follows

https://bugs.launchpad.net/calibre/+bug/1863160

There you can find the example html input file for conversion to azw3

I use debian unstable package: 4.99.4+dfsg+really4.10.0+py3-2

Interestingly, when using the current Windows calibre, the links are correct.
Reply 

#4  jhowell 02-13-2020, 02:51 PM
You are missing quotes around your HTML ids.

Code
<div id=a>
Reply 

#5  sewi_rafal 02-13-2020, 03:11 PM
Thank you for spotting it, but still the issue remains.
Reply 

#6  jhowell 02-13-2020, 03:57 PM
Quote sewi_rafal
I use debian unstable package: 4.99.4+dfsg+really4.10.0+py3-2
Probably a bug related to Python 3. Have you tried the official Linux release?

https://calibre-ebook.com/download_linux


Added: I tested your HTML file with the calibre 4.99.4 beta (Python 3) under Windows and it fails there. So it does appear to be related to calibre's Python 3 porrting.
Reply 

#7  sewi_rafal 02-14-2020, 02:50 AM
Quote jhowell
Probably a bug related to Python 3. Have you tried the official Linux release?
...
I have tried now, and the official Linux 4.10 version converts to azw3 successfully. Also I have tried the Windows beta 4.99.4 and it fails.

Note that the links in the converted epub format are correct.
Reply 

Today's Posts | Search this Thread | Login | Register