aedocw / epub2tts

Turn an epub or text file into an audiobook
Apache License 2.0
528 stars 50 forks source link

Error using epub source and default settings #239

Closed aedocw closed 5 months ago

aedocw commented 5 months ago

Using version 2.4.2 with the following command: epub2tts Downloads/mybook.epub

I got this error:

Traceback (most recent call last):
  File "/Users/doc/repos/epub2tts/.venv/bin/epub2tts", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/doc/repos/epub2tts/.venv/lib/python3.11/site-packages/epub2tts.py", line 902, in main
    mybook.read_book(
  File "/Users/doc/repos/epub2tts/.venv/lib/python3.11/site-packages/epub2tts.py", line 604, in read_book
    f"Something is wrong with the audio ({ratio}): {tempwav}"
                                          ^^^^^
UnboundLocalError: cannot access local variable 'ratio' where it is not associated with a value
aedocw commented 5 months ago

Really weird, but now I cannot reproduce, so closing.