shirah-reader
shirah-reader copied to clipboard
crash on entering speed read mode
Installed it today. It crashes when I start the speed read mode.
Traceback (most recent call last):
File "/home/user/.local/bin/shirah", line 8, in <module>
sys.exit(main())
File "/home/user/.local/lib/python3.8/site-packages/shirah_reader/__main__.py", line 2021, in main
curses.wrapper(preread, file)
File "/usr/lib/python3.8/curses/__init__.py", line 105, in wrapper
return func(stdscr, *args, **kwds)
File "/home/user/.local/lib/python3.8/site-packages/shirah_reader/__main__.py", line 1898, in preread
incr, width, y, pctg, sec = reader(ebook, idx, width, y, pctg, sec)
File "/home/user/.local/lib/python3.8/site-packages/shirah_reader/__main__.py", line 1826, in reader
ALLPREVLETTERS[index] + sum(LOCALPCTG[: y + rows - 1])
TypeError: can only concatenate tuple (not "int") to tuple
fyi, installed it with "pip3 install shirah-reader".
edit: removed it, reinstalled with pip instead of pip3, same issue.
I tried to recreate this issue locally using python 3.8.1, but could not. I suspect it maybe some issue with the file you are trying to read. Does this occur with all files?
I tried this specific epub file:
https://www.gutenberg.org/ebooks/28497 (epub, no images)
Same problem with this one:
https://www.gutenberg.org/ebooks/37488 (epub, no images)
They open fine in other epub readers. It's the speed reading that's showing me the error.
Hi there, so I downloaded the first file (Myths of the Norsemen), and am not able to recreate the bug. Could you do the following for me:
- In the assests folder of the repo, there is alice.epub (from project gutenberg), and try the speed reading mode.
- If that crashes too, I suspect its a python version mismatch, I am running my tests in 3.8.1, which version do you use?
I am just seeing how to recreate this bug locally, so that I can write some patch for it.
I couldn't find it on my machine, but I downloaded it from poject gutenburg. Same issue.
I'm using Python 3.8.6
Hi there, so I downloaded the first file (Myths of the Norsemen), and am not able to recreate the bug. Could you do the following for me:
- In the assests folder of the repo, there is alice.epub (from project gutenberg), and try the speed reading mode.
- If that crashes too, I suspect its a python version mismatch, I am running my tests in 3.8.1, which version do you use?
I am just seeing how to recreate this bug locally, so that I can write some patch for it.
Just a friendly reminder. Have you been able to replicate it? Both my desktop at home and at work have the same issue.
Unfortunately not. I will try and put some time in trying to replicate it again, but I am a little busy nowadays. Will attempt fixing this by the end of the year, with some other upgrades I have in mind.
I really appreciate that you shared this repo. It looks cool. It seemed to be working for me, but then it started crashing like mentioned above.
I'd also be curious whether it would be possible to make the font style and size configurable and eliminate the flicker. And make it "remember" where I left off for a certain book.
It does remember, as long it exits gracefully. You can see once how to exit. Again, didn't really get time to replicate the crash, but if it ever happens to me, will fix. To stop RSVP, hit ctrl+c and to get out of the reader, hit esc. It will remember your position for next time.
Also, the next time, you don't even need to type the full address, you can just type shirah <name-of-book>, it will do a search and open the book with the closest name among the ones you had previously opened.
Hi, I also face the same problem. I was able to replicate it, with alice.epub, python version 3.9.6. Setting wpm to 400wpm.
Issue is with rsvp() function. Addressed in https://github.com/Hallicopter/shirah-reader/pull/13