Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lostlost3 opened this issue Apr 8, 2024 · 4 comments
Open

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

lostlost3 opened this issue Apr 8, 2024 · 4 comments

Comments

@lostlost3
Copy link

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
Copy link

michwad commented May 27, 2024

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
Copy link
Owner

p0n1 commented Jun 28, 2024

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.

@shtingeri
Copy link

shtingeri commented Sep 21, 2024

Alternatively, add --no_prompt flag to avoid confirmation.

@lostlost3
Copy link
Author

lostlost3 commented Sep 23, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants