wustho / epy

CLI Ebook (epub2, epub3, fb2, mobi) Reader
GNU General Public License v3.0
962 stars 52 forks source link

[Resolved] Large Epub #22

Closed IcyFlamingArrow closed 3 years ago

IcyFlamingArrow commented 3 years ago

Hello, whenever I open a relatively large epub file, the most current is Linux Command Line and Shell Scripting Bible, I receive an error and and forced to use another epub reader such as Thorium. I have received it for War and Piece in the past as well. I am prevented from scrolling beyond a range of pages.

Error code:Traceback (most recent call last): File "/usr/bin/epy", line 33, in <module> sys.exit(load_entry_point('epy-reader==2021.4.5', 'console_scripts', 'epy')()) File "/usr/lib/python3.9/site-packages/epy.py", line 2246, in main curses.wrapper(preread, file) File "/usr/lib/python3.9/curses/__init__.py", line 94, in wrapper return func(stdscr, *args, **kwds) File "/usr/lib/python3.9/site-packages/epy.py", line 2126, in preread incr, width, y, pctg, sec = reader( File "/usr/lib/python3.9/site-packages/epy.py", line 1648, in reader src_lines, imgs, toc_secid, formatting = parser.get_lines(width) File "/usr/lib/python3.9/site-packages/epy.py", line 560, in get_lines if i[0] == i[2]: IndexError: list index out of range

Is this due to the ebook version I am using or am I able to bypass this error with some minor adjustment?

Thank you for your help, and your application has been excellent so far. Is there any place where I can donate?

wustho commented 3 years ago

Hello there, @IcyFlamingArrow . Yes, sorry about that. I just realized it yesterday and it should be fixed by version 2021.4.5.

Can you try to uninstall it: pip uninstall epy-reader and then reinstall: pip install epy-reader? does it work?

IcyFlamingArrow commented 3 years ago

Dear @wustho, I am still receiving the same error following sudo pip uninstall epy-reader sudo pip install epy-reader

Error output: File "/usr/bin/epy", line 8, in <module> sys.exit(main()) File "/usr/lib/python3.9/site-packages/epy.py", line 2246, in main curses.wrapper(preread, file) File "/usr/lib/python3.9/curses/__init__.py", line 94, in wrapper return func(stdscr, *args, **kwds) File "/usr/lib/python3.9/site-packages/epy.py", line 2126, in preread incr, width, y, pctg, sec = reader( File "/usr/lib/python3.9/site-packages/epy.py", line 1648, in reader src_lines, imgs, toc_secid, formatting = parser.get_lines(width) File "/usr/lib/python3.9/site-packages/epy.py", line 560, in get_lines if i[0] == i[2]: IndexError: list index out of range

wustho commented 3 years ago

@IcyFlamingArrow have you try other epub file for the same book title? Since some epub file is not structured according to standard...

IcyFlamingArrow commented 3 years ago

Thank you, another version of the e-book is working. I sincerely apologize for inconveniencing you with my insignificant concern today.

wustho commented 3 years ago

Ah, @IcyFlamingArrow no problem for me mate, not much work today... And I just found epub that reproduce the same error, might fix it tomorrow...

Sorry I reopen this to be my todo list

Yeah you can donate via paypal thanks

wustho commented 3 years ago

Fixed: 97f1213bd6c910096b50717e387b4aa4b0495596

IcyFlamingArrow commented 3 years ago

I have tested it on the E-books and there are no issues.

Thank you, people like you inspire me to learn coding in order to contribute to projects like these. Your assistance was greatly appreciated yesterday and I hope that your day goes wonderfully today.

Best regards, IcyFlamingArrow.