diff --git a/book_maker/loader/helper.py b/book_maker/loader/helper.py index cae8ac8f..85557edd 100644 --- a/book_maker/loader/helper.py +++ b/book_maker/loader/helper.py @@ -12,9 +12,10 @@ def __init__( self.context_flag = context_flag def insert_trans(self, p, text, translation_style="", single_translate=False): + if text is None: + text = "" if ( p.string is not None - and text is not None and p.string.replace(" ", "").strip() == text.replace(" ", "").strip() ): return diff --git a/setup.py b/setup.py index 76e090b0..f7af2557 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setup( name="bbook_maker", description="The bilingual_book_maker is an AI translation tool that uses ChatGPT to assist users in creating multi-language versions of epub/txt files and books.", - version="0.7.7", + version="0.7.8", license="MIT", author="yihong0618", author_email="zouzou0208@gmail.com",