Guttenberg-Search
Guttenberg-Search copied to clipboard
Parsing fails on 815 txt file?
https://www.gutenberg.org/ebooks/815.txt.utf-8
The above file might have some content that changed recently which causes an error while parsing. It results in an error as shown below:
Reading File - 815.txt
Reading Book - Democracy In America, Volume 1 (of 2) By Alexis de Toqueville
TypeError: Cannot read property 'index' of null
at parseBookFile (/usr/src/app/server/load_data.js:41:45)
at readAndInsertBooks (/usr/src/app/server/load_data.js:19:45)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
For now, temporary fix is to remove https://www.gutenberg.org/ebooks/815.txt.utf-8
from download_links.txt
file. But if this book is important, then I guess regex might have to be updated while getting the "START" match.