argument of type 'NoneType' is not iterable #368

Closed
opened 2023-09-04 18:32:23 +00:00 by FergasunFergie · 3 comments

Hello,
I am coming over from using the base tortoise-tts to this repository and was brave enough to install on the Anaconda Windows environment. I understand that building/installing these tools in windows feels like a "hack" -- but I've got a GTX 1660 with 6 GB VRAM.

Was able to get through a number of issues with installing this in Anaconda. But there are a few errors in gradio and places that I had to comment out code in order to prevent faults, untll I downgraded to Gradio 3.23.

Now it is really odd - I was having a problem with seeing 'NoneType' is not iterable when I was in training, and trying to prepare dataset under the training tab. transcribing

This happened when I set "Validation Text Length Threshold" and "Validation Audio Length Treshold" to "0" each. I just realized as I was trying to re-create the error, I used the default values of 12 and 1 respectively, it worked. Seemed like the documentation said that setting to "0" would ignore those values.

So I guess the error is using 0 for both of those doesn't seem to work like using the default values.

For anyone reading this trying to fight through installing on Anaconda, my biggest issue when installing was that GPU CUDA was not enabled. I was able to tell via:

python -c "import torch; print(torch.cuda.is_available());torch.zeros(1).cuda()"

I basically had to uninstall and then re-install via below command

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117

I also ran into the error with the model being the corrupted (the 1.7 Gb one):
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
I re-downloaded it from I guess it was HuggingFace (I think it is the tortoise-tts v2 model).

I was also getting an issue with below:
Task exception was never retrieved
future: <Task finished name='64mkxjl8bqn_46' coro=<Queue.process_events() done, defined at D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\gradio\queueing.py:343> exception=1 validation error for PredictBody
event_id
Field required [type=missing, input_value={'fn_index': 46, 'data': ...on_hash': '64mkxjl8bqn'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.3/v/missing>
Traceback (most recent call last):
File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\gradio\queueing.py", line 347, in process_events

Got through that error by using a different version of pydantic:
pip uninstall pydantic
pip uninstall pydantic-core
pip install pydantic==1.10.11
pip install pydantic-core

I find the base tortoise-tts to be legendary and mrq - you are a legend for making the training/fine tuning widely available. I look forward to understanding the training/finetuning process.

Hello, I am coming over from using the base tortoise-tts to this repository and was brave enough to install on the Anaconda Windows environment. I understand that building/installing these tools in windows feels like a "hack" -- but I've got a GTX 1660 with 6 GB VRAM. Was able to get through a number of issues with installing this in Anaconda. But there are a few errors in gradio and places that I had to comment out code in order to prevent faults, untll I downgraded to Gradio 3.23. Now it is really odd - I was having a problem with seeing 'NoneType' is not iterable when I was in training, and trying to prepare dataset under the training tab. transcribing This happened when I set "Validation Text Length Threshold" and "Validation Audio Length Treshold" to "0" each. I just realized as I was trying to re-create the error, I used the default values of 12 and 1 respectively, it worked. Seemed like the documentation said that setting to "0" would ignore those values. So I guess the error is using 0 for both of those doesn't seem to work like using the default values. For anyone reading this trying to fight through installing on Anaconda, my biggest issue when installing was that GPU CUDA was not enabled. I was able to tell via: python -c "import torch; print(torch.cuda.is_available());torch.zeros(1).cuda()" I basically had to uninstall and then re-install via below command pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117 I also ran into the error with the model being the corrupted (the 1.7 Gb one): RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory I re-downloaded it from I guess it was HuggingFace (I think it is the tortoise-tts v2 model). I was also getting an issue with below: Task exception was never retrieved future: <Task finished name='64mkxjl8bqn_46' coro=<Queue.process_events() done, defined at D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\gradio\queueing.py:343> exception=1 validation error for PredictBody event_id Field required [type=missing, input_value={'fn_index': 46, 'data': ...on_hash': '64mkxjl8bqn'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.3/v/missing> Traceback (most recent call last): File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\gradio\queueing.py", line 347, in process_events Got through that error by using a different version of pydantic: pip uninstall pydantic pip uninstall pydantic-core pip install pydantic==1.10.11 pip install pydantic-core I find the base tortoise-tts to be legendary and mrq - you are a legend for making the training/fine tuning widely available. I look forward to understanding the training/finetuning process.
Author

Nope. For some reason I just tried to train again... and I did leave it at the defaults. I got the same error.

When I am in the "Training Tab" and hit "Prepare Dataset"

File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\gradio\routes.py", line 394, in run_predict
output = await app.get_blocks().process_api(
File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 1075, in process_api
result = await self.call_function(
File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 884, in call_function
prediction = await anyio.to_thread.run_sync(
File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run
result = context.run(func, *args)
File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\gradio\helpers.py", line 587, in tracked_fn
response = fn(*args)
File "D:\applications\ai-voice-cloning\ai-voice-cloning\src\webui.py", line 243, in prepare_dataset_proxy
message = transcribe_dataset( voice=voice, language=language, skip_existings=skip_existings, progress=progress )
File "D:\applications\ai-voice-cloning\ai-voice-cloning\src\utils.py", line 2227, in transcribe_dataset
load_whisper_model(language=language)
File "D:\applications\ai-voice-cloning\ai-voice-cloning\src\utils.py", line 3877, in load_whisper_model
import whisper
File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\whisper.py", line 69, in
libc = ctypes.CDLL(libc_name)
File "D:\APPLICATIONS\anaconda3\envs\tortoise\lib\ctypes_init_.py", line 364, in init
if '/' in name or '\' in name:
TypeError: argument of type 'NoneType' is not iterable

Nope. For some reason I just tried to train again... and I did leave it at the defaults. I got the same error. When I am in the "Training Tab" and hit "Prepare Dataset" File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\gradio\routes.py", line 394, in run_predict output = await app.get_blocks().process_api( File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 1075, in process_api result = await self.call_function( File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\gradio\blocks.py", line 884, in call_function prediction = await anyio.to_thread.run_sync( File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run result = context.run(func, *args) File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\gradio\helpers.py", line 587, in tracked_fn response = fn(*args) File "D:\applications\ai-voice-cloning\ai-voice-cloning\src\webui.py", line 243, in prepare_dataset_proxy message = transcribe_dataset( voice=voice, language=language, skip_existings=skip_existings, progress=progress ) File "D:\applications\ai-voice-cloning\ai-voice-cloning\src\utils.py", line 2227, in transcribe_dataset load_whisper_model(language=language) File "D:\applications\ai-voice-cloning\ai-voice-cloning\src\utils.py", line 3877, in load_whisper_model import whisper File "D:\applications\ai-voice-cloning\ai-voice-cloning\venv\lib\site-packages\whisper.py", line 69, in <module> libc = ctypes.CDLL(libc_name) File "D:\APPLICATIONS\anaconda3\envs\tortoise\lib\ctypes\__init__.py", line 364, in __init__ if '/' in name or '\\' in name: TypeError: argument of type 'NoneType' is not iterable
Author

This appears to be a whisper error.

Will comment with a solution once I work through this.

This appears to be a whisper error. Will comment with a solution once I work through this.
Author

Very easy fix.

pip uninstall whisper
pip install openai-whisper

I feel like I may have complicated things by using the tortoise-tts virtual environment that was working previously, so maybe I didn't have the correct version of whisper installed?

edited to say: If you are having errors like this, you didn't install properly! I re-installed properly from scratch and everything is now functioning as expected!

Very easy fix. pip uninstall whisper pip install openai-whisper I feel like I may have complicated things by using the tortoise-tts virtual environment that was working previously, so maybe I didn't have the correct version of whisper installed? edited to say: If you are having errors like this, you didn't install properly! I re-installed properly from scratch and everything is now functioning as expected!
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrq/ai-voice-cloning#368
No description provided.