internetarchive/epub3

Details says epubs available, but epub generator fails e.g. on lalindadichamoun00doni

mitra42 opened this issue · 8 comments

Traceback (most recent call last):
  File "/usr/local/bin/abbyy2epub", line 11, in 
    load_entry_point('abbyy-to-epub3==1.7.2', 'console_scripts', 'abbyy2epub')()
  File "/usr/local/lib/python3.5/dist-packages/abbyy_to_epub3/commandline.py", line 95, in main
    epub_outfile=args.out or 'out.epub', tmpdir=args.tmpdir
  File "/usr/local/lib/python3.5/dist-packages/abbyy_to_epub3/create_epub.py", line 1077, in craft_epub
    parser.parse_abbyy()
  File "/usr/local/lib/python3.5/dist-packages/abbyy_to_epub3/parse_abbyy.py", line 299, in parse_abbyy
    fast_iter(context, self.process_pages)
  File "/usr/local/lib/python3.5/dist-packages/abbyy_to_epub3/utils.py", line 75, in fast_iter
    func(elem)
  File "/usr/local/lib/python3.5/dist-packages/abbyy_to_epub3/parse_abbyy.py", line 358, in process_pages
    self.blocks[-1]['type'] != 'Page'
IndexError: list index out of range

@deborahgu is an issue you may be amenable to work with us on?
cc: @bfalling ?

Yes, it is, definitely.

I submitted a PR for this fix. It's a one-liner, but I took a little time to make sure the condition wasn't a symptom of a wider problem. (It's not; it's just a case which can sometime occur.)

#42

Hmm, are those test failure ones which always happen on your environment, or are they exceptional? They don't fail in my environment so I can't verify.

What I saw was that the ones that failed, always failed.

@bfalling - I think you said you were working on some aspect of this as well - can you confirm ?