yihong0618 / bilingual_book_maker

Make bilingual epub books Using AI translate
MIT License
6.91k stars 1k forks source link

`--resume` would raise error: `'NoneType' object has no attribute 'replace' you can resume it next time` #381

Closed imWildCat closed 5 months ago

imWildCat commented 5 months ago

Hello, the resume functionality seems to be broken.

I tried it like

bbook_maker --openai_key xxx --api_base 'https://xxx.openai.azure.com/' --deployment_id 'gpt35' --book_name xxx --resume

it just returned

'NoneType' object has no attribute 'replace'
you can resume it next time

there's no call stack shown

yihong0618 commented 5 months ago

@imWildCat try to fix it, not sure if its this problem, reopen it

please try to use the latest package(or code)

imWildCat commented 5 months ago

thank you!

using the latest version, it now shows:

  0%|                                                                                | 0/4728 [00:00<?, ?it/s]

NoneType takes no arguments
you can resume it next time
yihong0618 commented 5 months ago

seems something is wrong will take a look tonight or romorrow and revert the latest commit

yihong0618 commented 5 months ago

@imWildCat seems fixed this time

imWildCat commented 5 months ago

I can confirm the fix. thanks for your quick action!