Latin encode error while converting from epub to htmlz

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

Bug Description

Using Calibre version 2.38 in Linux Mint

This occurs in all of the epubs I tried when I tried to convert it from epub to htmlz. I tried changing the input character encoding to UTF-8. Even then the same issue is occuring.

Traceback (most recent call last):
  File "site.py", line 63, in main
  File "site-packages/calibre/utils/ipc/worker.py", line 193, in main
  File "site-packages/calibre/gui2/convert/gui_conversion.py", line 31, in gui_convert_override
  File "site-packages/calibre/gui2/convert/gui_conversion.py", line 25, in gui_convert
  File "site-packages/calibre/ebooks/conversion/plumber.py", line 1198, in run
  File "site-packages/calibre/ebooks/conversion/plugins/htmlz_output.py", line 73, in convert
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2019' in position 620: ordinal not in range(256)

This is the error which I got. If you want I can attach the input epub file

Tags: convert htmlz
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 Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
Revision history for this message
Klack (klackerz) wrote :

Thanks for the fix. It's working Apparently the same error also occurs while converting from epub to zip format.

Traceback (most recent call last):
  File "site.py", line 63, in main
  File "site-packages/calibre/utils/ipc/worker.py", line 193, in main
  File "site-packages/calibre/gui2/convert/gui_conversion.py", line 31, in gui_convert_override
  File "site-packages/calibre/gui2/convert/gui_conversion.py", line 25, in gui_convert
  File "site-packages/calibre/ebooks/conversion/plumber.py", line 1198, in run
  File "site-packages/calibre/ebooks/conversion/plugins/html_output.py", line 129, in convert
  File "site-packages/templite/__init__.py", line 81, in render
  File "<templite u'<!DOCTYPE html PUBLI'>", line 21, in <module>
  File "site-packages/templite/__init__.py", line 87, in write
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2019' in position 176: ordinal not in range(256)

Here's the debug.

Klack (klackerz)
Changed in calibre:
status: Fix Released → Confirmed
status: Confirmed → Fix Released
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1499514

next release

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.