foliate icon indicating copy to clipboard operation
foliate copied to clipboard

mobi: Error ( The string did not match the expected pattern )

Open zzzsyyy opened this issue 2 years ago • 3 comments

When I open a .mobi book, it take a long time, and show "could not open file"

this is the message after foliate --verbose

Gjs-Message: 16:31:52.884: JS LOG: run_javascript: open(
                    decodeURI("/tmp/.CGOXK1/mobi8/"),
                    decodeURI("C-pointer"),
                    'directory',
                    'viewer',
                    {"width":"100...
Gjs-Message: 16:31:52.889: JS LOG: book-error

(com.github.johnfactotum.Foliate:9202): Gjs-WARNING **: 16:31:52.889: JS ERROR: Error: The string did not match the expected pattern.
_init/<@resource:///com/github/johnfactotum/Foliate/js/epubView.js:623:57
_handleAction@resource:///com/github/johnfactotum/Foliate/js/epubView.js:886:22
_init/<@resource:///com/github/johnfactotum/Foliate/js/epubView.js:617:18
main@resource:///com/github/johnfactotum/Foliate/js/main.js:478:24
run@resource:///org/gnome/gjs/modules/script/package.js:206:19
@/usr/bin/foliate:9:17

Version:

  • Foliate version: from AUR 2.6.4-1
  • Arch Linux
  • WM: i3

zzzsyyy avatar Apr 26 '22 08:04 zzzsyyy

Hi @zzzsyyy - I did tried opening .mobi file and it is working fine for me. Try the following solution and see if that works for you.

https://github.com/johnfactotum/foliate/issues/878#issuecomment-1079727273

rahulTPatil avatar May 08 '22 06:05 rahulTPatil

Thank you and the solution worked -- I can open the book but there's an err shows on the first page

This page contains the following errors:

error on line 805 at column 12: Entity 'hoge' not defined
error on line 995 at column 25: Entity 'hoge' not defined
error on line 2071 at column 34: EntityRef: expecting ';'
Below is a rendering of the page up to the first error.

This is the e-book file if needed here Merci d'avance

zzzsyyy avatar May 10 '22 12:05 zzzsyyy

Tried opening the attached book and got the exact same error on the first page as you got. However, the rest of the book loads till the 43rd page.

rahulTPatil avatar May 10 '22 16:05 rahulTPatil

For the problem with entities, see #699.

johnfactotum avatar Sep 30 '22 07:09 johnfactotum