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

Error trying to translate a text file with german text to english using NLLB #408

Closed
muser-ux opened this issue Nov 24, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@muser-ux
Copy link

Which OS are you using?

  • OS: Ubuntu 24.04.1 LTS
  • Whisper-WebUI installed with

git clone https://github.com/jhj0517/Whisper-WebUI.git
docker compose build
docker compose up

T2T Tranlation -> NLLB
Model: facebook/nllb-200-distilled-600M
Source language: German
Target Language; English

Error:

whisper-webui-app-1  | Error translating file: 'WriteTXT' object has no attribute 'to_segments'
whisper-webui-app-1  | Traceback (most recent call last):
whisper-webui-app-1  |   File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/queueing.py", line 624, in process_events
whisper-webui-app-1  |     response = await route_utils.call_process_api(
whisper-webui-app-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whisper-webui-app-1  |   File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/route_utils.py", line 323, in call_process_api
whisper-webui-app-1  | 
whisper-webui-app-1  |     output = await app.get_blocks().process_api(
whisper-webui-app-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whisper-webui-app-1  |   File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/blocks.py", line 2015, in process_api
whisper-webui-app-1  |     result = await self.call_function(
whisper-webui-app-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^
whisper-webui-app-1  |   File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/blocks.py", line 1562, in call_function
whisper-webui-app-1  |     prediction = await anyio.to_thread.run_sync(  # type: ignore
whisper-webui-app-1  |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whisper-webui-app-1  |   File "/Whisper-WebUI/venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
whisper-webui-app-1  |     return await get_async_backend().run_sync_in_worker_thread(
whisper-webui-app-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
whisper-webui-app-1  |   File "/Whisper-WebUI/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2441, in run_sync_in_worker_thread
whisper-webui-app-1  |     return await future
whisper-webui-app-1  |            ^^^^^^^^^^^^
whisper-webui-app-1  |   File "/Whisper-WebUI/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 943, in run
whisper-webui-app-1  |     result = context.run(func, *args)
whisper-webui-app-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^
whisper-webui-app-1  |   File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/utils.py", line 865, in wrapper
whisper-webui-app-1  |     response = f(*args, **kwargs)
whisper-webui-app-1  |                ^^^^^^^^^^^^^^^^^^
whisper-webui-app-1  |   File "/Whisper-WebUI/modules/translation/translation_base.py", line 99, in translate_file
whisper-webui-app-1  |     segments = writer.to_segments(fileobj)
whisper-webui-app-1  |                ^^^^^^^^^^^^^^^^^^
whisper-webui-app-1  | AttributeError: 'WriteTXT' object has no attribute 'to_segments'


@muser-ux muser-ux added the bug Something isn't working label Nov 24, 2024
@jhj0517
Copy link
Owner

jhj0517 commented Nov 25, 2024

Hi, @muser-ux. Thanks for reporting the bug!
This is fixed in #409.

Please feel free to re open if you're still having the problem!

@jhj0517 jhj0517 closed this as completed Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants