Closed ShadF0x closed 10 months ago
Hi @ShadF0x, thanks for reporting this. This should now be fixed in #81, please let me know if the problem persists!
Yep, works fine now.
I stumbled upon a similar issue today, though the stack trace is different, the exact exception seems to be the same:
app-1 | Error: 'NoneType' object has no attribute 'endswith'
app-1 | Traceback (most recent call last):
app-1 | File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/queueing.py", line 624, in process_events
app-1 | response = await route_utils.call_process_api(
app-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app-1 | File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/route_utils.py", line 323, in call_process_api
app-1 | output = await app.get_blocks().process_api(
app-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app-1 | File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/blocks.py", line 2028, in process_api
app-1 | data = await self.postprocess_data(block_fn, result["prediction"], state)
app-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app-1 | File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/blocks.py", line 1784, in postprocess_data
app-1 | self.validate_outputs(block_fn, predictions) # type: ignore
app-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app-1 | File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/blocks.py", line 1739, in validate_outputs
app-1 | raise ValueError(
app-1 | ValueError: A function (translate_file) didn't return enough output values (needed: 2, returned: 1).
app-1 | Output components:
app-1 | [textbox, file]
app-1 | Output values returned:
app-1 | [None]
@mciszczon I just tried to reproduce, it worked fine with latest version.
Can you try with the latest version?
@mciszczon I just tried to reproduce, it worked fine with latest version.
Can you try with the latest version?
Duh, I was indeed a few commits behind, but after pulling in changes and rebuilding the image just to be sure, the problem still remains.
I am on an M2 Macbook Air and running the app through Docker Compose.
Hmm. Can you paste the stack trace again? is the error message the same?
Error: 'NoneType' object has no attribute 'endswith'
This is weird because the only place I used endswith
is just one line out of the whole project, and it's nothing to do with the translation.
Unfortunately that's the entire stack that I see from the container log, literally it:
$ dc logs -f --tail 200
app-1 | Use "faster-whisper" implementation
app-1 | Device "auto" is detected
app-1 | * Running on local URL: http://0.0.0.0:7860
app-1 |
app-1 | To create a public link, set `share=True` in `launch()`.
app-1 |
app-1 | Initializing NLLB Model..
app-1 |
app-1 | Error: 'NoneType' object has no attribute 'endswith'
app-1 | Traceback (most recent call last):
app-1 | File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/queueing.py", line 624, in process_events
app-1 | response = await route_utils.call_process_api(
app-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app-1 | File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/route_utils.py", line 323, in call_process_api
app-1 | output = await app.get_blocks().process_api(
app-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app-1 | File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/blocks.py", line 2028, in process_api
app-1 | data = await self.postprocess_data(block_fn, result["prediction"], state)
app-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app-1 | File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/blocks.py", line 1784, in postprocess_data
app-1 | self.validate_outputs(block_fn, predictions) # type: ignore
app-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app-1 | File "/Whisper-WebUI/venv/lib/python3.11/site-packages/gradio/blocks.py", line 1739, in validate_outputs
app-1 | raise ValueError(
app-1 | ValueError: A function (translate_file) didn't return enough output values (needed: 2, returned: 1).
app-1 | Output components:
app-1 | [textbox, file]
app-1 | Output values returned:
app-1 | [None]
Any possibility that it's actually a bug in gradio
itself? See that the stack trace doesn't even contain anything from your code base, it starts and ends entirely in site-packages.
I couldn't reproduce it.
I'm sorry but what I can say is just remove the image completely (even the builds, since there have been changes in the requirements.txt
)
and rebuild the image from scratch.
This will take some time.
Or if it still fails, you can try the pinokio, since this WebUI is registered in there.
Which OS are you using?
Wanted to tinker with T2T Translation to see what it's capable off, but upon loading any NLLB model, the process errors out with this output in the console: