p0n1 / epub_to_audiobook

EPUB to audiobook converter, optimized for Audiobookshelf
MIT License
888 stars 86 forks source link

EOFError: EOF when reading a line in v0.5.0 or v0.5.1 #60

Open lostlost3 opened 2 months ago

lostlost3 commented 2 months ago

When I convert epub ebook to audiobook using v0.4.3 version, it works fine. In order to use edge tts, I tried to use v0.5.0 or v0.5.1 to convert the same epub e-book, and the error occurred as follows:

/usr/local/lib/python3.11/site-packages/ebooklib/epub.py:1395: UserWarning: In the future version we will turn default option ignore_ncx to True. warnings.warn('In the future version we will turn default option ignore_ncx to True.') /usr/local/lib/python3.11/site-packages/bs4/builder/init.py:545: XMLParsedAsHTMLWarning: It looks like you're parsing an XML document using an HTML parser. If this really is an HTML document (maybe it's XHTML?), you can ignore or filter this warning. If it's XML, you should know that using an XML parser will be more reliable. To parse this document as XML, make sure you have the lxml package installed, and pass the keyword argument features="xml" into the BeautifulSoup constructor. warnings.warn( 2024-04-08 02:55:06 [INFO] Chapters count: 320. 2024-04-08 02:55:06 [INFO] Converting chapters from 1 to 320. Estimate book voiceover would cost you roughly: $0.00 Do you want to continue? (y/n) 2024-04-08 02:55:06 [INFO] ✨ Total characters in selected book: 1595407 ✨ Traceback (most recent call last): File "/app_src/main.py", line 139, in main() File "/app_src/main.py", line 135, in main AudiobookGenerator(config).run() File "/app_src/audiobook_generator/core/audiobook_generator.py", line 77, in run confirm_conversion() File "/app_src/audiobook_generator/core/audiobook_generator.py", line 14, in confirm_conversion answer = input() ^^^^^^^ EOFError: EOF when reading a line

michwad commented 1 month ago

I'm getting the same in docker :(

warnings.warn('In the future version we will turn default option ignore_ncx to True.') /usr/local/lib/python3.11/site-packages/bs4/builder/init.py:545: XMLParsedAsHTMLWarning: It looks like you're parsing an XML document using an HTML parser. If this really is an HTML document (maybe it's XHTML?), you can ignore or filter this warning. If it's XML, you should know that using an XML parser will be more reliable. To parse this document as XML, make sure you have the lxml package installed, and pass the keyword argument features="xml" into the BeautifulSoup constructor. warnings.warn( 2024-05-27 19:22:22 [INFO] Chapters count: 55. 2024-05-27 19:22:22 [INFO] Converting chapters from 1 to 55. 2024-05-27 19:22:22 [INFO] ✨ Total characters in selected book: 521832 ✨ Traceback (most recent call last): File "/app_src/main.py", line 139, in Estimate book voiceover would cost you roughly: $8.35

Do you want to continue? (y/n) main() File "/app_src/main.py", line 135, in main AudiobookGenerator(config).run() File "/app_src/audiobook_generator/core/audiobook_generator.py", line 77, in run confirm_conversion() File "/app_src/audiobook_generator/core/audiobook_generator.py", line 14, in confirm_conversion answer = input() ^^^^^^^ EOFError: EOF when reading a line

p0n1 commented 4 days ago

Hi @lostlost3 @michwad. Would you mind update to the latest and try it again?

Besides, what's your command to run and lead to this error message.

Remember if you're using docker, check https://github.com/p0n1/epub_to_audiobook?tab=readme-ov-file#using-with-docker.

The -i and -t options are required to enable interactive mode and allocate a pseudo-TTY.