Guttenberg-Search icon indicating copy to clipboard operation
Guttenberg-Search copied to clipboard

Parsing fails on 815 txt file?

Open rohitkrishna094 opened this issue 2 years ago • 0 comments

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.

rohitkrishna094 avatar Jul 23 '22 23:07 rohitkrishna094