|
|
#1 | |
|
Connoisseur
![]() Posts: 61
Karma: 10
Join Date: Oct 2018
Device: kindle
|
ebook-convert epub to pdf RuntimeError
I'm using the lastest linux binary,
Quote:
|
|
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,413
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Dont see how thats possible if you are using the official binaries. Since they come with their own bundled libxml. Use LD_DEBUG=libs to figure out where the spurious libxml is coming from.
|
|
|
|
|
|
#3 |
|
Connoisseur
![]() Posts: 61
Karma: 10
Join Date: Oct 2018
Device: kindle
|
LD_DEBUG=libs ebook-convert b.epub b.pdf 2>&1 | grep -i "libxml2" > /tmp/ld_debug.log
cat /tmp/ld_debug.log 190956: find library=libxml2.so.16 [0]; searching 190956: trying file=/root/calibre/lib/libxml2.so.16 190956: calling init: /root/calibre/lib/libxml2.so.16 190961: find library=libxml2.so.16 [0]; searching 190961: trying file=/root/calibre/lib/libxml2.so.16 190960: find library=libxml2.so.16 [0]; searching 190960: trying file=/root/calibre/lib/libxml2.so.16 190960: calling init: /root/calibre/lib/libxml2.so.16 190961: calling init: /root/calibre/lib/libxml2.so.16 190956: find library=libxml2.so.2 [0]; searching 190956: trying file=/root/calibre/lib/libxml2.so.2 190956: trying file=/lib/x86_64-linux-gnu/libxml2.so.2 190956: calling init: /lib/x86_64-linux-gnu/libxml2.so.2 RuntimeError: html5-parser and lxml are using different versions of libxml2. This happens commonly when using pip installed versions of lxml. Use pip install --no-binary lxml lxml instead. libxml2 versions: html5-parser: (2, 9, 14) != lxml: (2, 15, 3) 190956: calling fini: /lib/x86_64-linux-gnu/libxml2.so.2 [0] 190956: calling fini: /root/calibre/lib/libxml2.so.16 [0] |
|
|
|
|
|
#4 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,413
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
|
|
|
|
|
#5 | ||
|
Connoisseur
![]() Posts: 61
Karma: 10
Join Date: Oct 2018
Device: kindle
|
Quote:
Quote:
|
||
|
|
|
|
|
#6 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,413
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
AI has no clue what it's talking about.
Code:
ldd html_parser.cpython-314-x86_64-linux-gnu.so| grep xml libxml2.so.16 => /usr/lib/libxml2.so.16 (0x00007fd29e127000) And I tried, once again, to reproduce this issue in a fresh debian:stable container which has libxml.so.2 installed and it does not reproduce. /opt/calibre/ebook-convert test.txt .pdf works as expected. Last edited by kovidgoyal; Today at 03:31 AM. |
|
|
|
|
|
#7 | |
|
Connoisseur
![]() Posts: 61
Karma: 10
Join Date: Oct 2018
Device: kindle
|
But it's confusing why 8.x version works.
Quote:
|
|
|
|
|
|
|
#8 | ||
|
Connoisseur
![]() Posts: 61
Karma: 10
Join Date: Oct 2018
Device: kindle
|
After a lot of testing, I think I've found the actual culprit — it's
QtWebEngine's GPU probing on GPU-less servers, not html5-parser itself. The workaround that fixed it: Quote:
Quote:
VPS/server (a pretty common calibre-server setup), it might be worth flagging in the docs, or even defaulting to --disable-gpu when no display/GPU is detected. |
||
|
|
|
|
|
#9 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,413
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It will only affect people running on debian I dont think anybody else still ships the highly broken/insecure libxml.so.2 and I still cannot replicate it in debian:stable container.
Not to mention that calibre anyway disables webengine GPU in ebook-convert as it is headless, see line 1853 in gui2/__init__.py |
|
|
|
|
|
#10 |
|
Connoisseur
![]() Posts: 61
Karma: 10
Join Date: Oct 2018
Device: kindle
|
I'm using Debian 12 and will keep using it for 2-3 years. The --disable-gpu workaround should be my fix.
|
|
|
|
|
|
#11 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,336
Karma: 153744555
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Which version of calibre are you running?
|
|
|
|
![]() |
| Tags |
| ebook-convert |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert a pdf to epub for edit back to pdf increased page numbers. | Construct | Conversion | 4 | 07-18-2023 12:56 PM |
| Convert Image PDF to PDF with text or other ebook format. | Memes | 7 | 05-01-2023 04:52 PM | |
| ebook-convert changes width of pdf pdf-odd-even-offset and pdf-add-toc used both | Lafisrap | Conversion | 4 | 09-04-2020 06:43 AM |