ebook convert successfully in GUI but failed in command line

Bug #1813905 reported by Tshu Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

if I convert azw3 or mobi books in terminal to zip, I always got the following error. However everything work fine if I convert book in GUI. I wander if there is any option should set in command line convertation or any other tips. thx

BTW, attachment is a sample book.

System: macOS Mojave 10.14.3
Calibre: 3.38.1
ebook-convert (calibre 3.38.1)
Created by: Kovid Goyal <email address hidden>

Error:
Python function terminated unexpectedly: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters
Traceback (most recent call last):
  File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 154, in main
    return run_entry_point()
  File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 114, in run_entry_point
    return getattr(pmod, func)()
  File "site-packages/calibre/ebooks/conversion/cli.py", line 391, in main
  File "site-packages/calibre/ebooks/conversion/plumber.py", line 1270, in run
  File "site-packages/calibre/ebooks/conversion/plugins/html_output.py", line 123, in convert
  File "site-packages/calibre/ebooks/conversion/plugins/html_output.py", line 75, in generate_html_toc
  File "site-packages/calibre/ebooks/conversion/plugins/html_output.py", line 69, in generate_toc
  File "site-packages/calibre/ebooks/conversion/plugins/html_output.py", line 61, in build_node
  File "site-packages/calibre/ebooks/oeb/base.py", line 318, in element
  File "src/lxml/lxml.etree.pyx", line 3127, in lxml.etree.SubElement (src/lxml/lxml.etree.c:78512)
  File "src/lxml/apihelpers.pxi", line 203, in lxml.etree._makeSubElement (src/lxml/lxml.etree.c:18851)
  File "src/lxml/apihelpers.pxi", line 198, in lxml.etree._makeSubElement (src/lxml/lxml.etree.c:18777)
  File "src/lxml/apihelpers.pxi", line 302, in lxml.etree._initNodeAttributes (src/lxml/lxml.etree.c:20259)
  File "src/lxml/apihelpers.pxi", line 316, in lxml.etree._addAttributeToNode (src/lxml/lxml.etree.c:20597)
  File "src/lxml/apihelpers.pxi", line 1443, in lxml.etree._utf8 (src/lxml/lxml.etree.c:31876)
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters

Revision history for this message
Tshu Wang (voleking) wrote :
description: updated
Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.