View Single Post
Old 06-16-2021, 11:26 PM   #1
xxyzz
Evangelist
xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.
 
Posts: 442
Karma: 2666666
Join Date: Nov 2020
Device: none
Failed to extract text from gutenberg books

I get the following error on some gutenberg books when I call "MobiReader.extract_text()". For example, both Kindle ebooks of Alice's Adventures in Wonderland at https://www.gutenberg.org/ebooks/11 will cause this error.

Code:
 mobiReader.extract_text()
  File "calibre/ebooks/mobi/reader/mobi6.py", line 802, in extract_text
  File "calibre/ebooks/mobi/reader/mobi6.py", line 802, in <listcomp>
  File "calibre/ebooks/mobi/reader/mobi6.py", line 797, in text_section
  File "calibre/ebooks/mobi/reader/mobi6.py", line 787, in sizeof_trailing_entries
TypeError: ord() expected a character, but string of length 0 found
KindleUnpack doesn't have this issue, I find the similar code at https://github.com/kevinhendricks/Ki...r.py#L816-L830 but don't know how to fix the bug.
xxyzz is offline   Reply With Quote