C0untFloyd / bark-gui

🔊 Text-Prompted Generative Audio Model with Gradio
MIT License
663 stars 60 forks source link

TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' #73

Open Maximo-Rulli opened 1 year ago

Maximo-Rulli commented 1 year ago

When trying to initialize the webui.py from wsl I am getting the following error: Traceback (most recent call last): File "/mnt/c/users/usuario/desktop/dev/ml/bark/webui.py", line 21, in from cloning.clonevoice import clone_voice File "/mnt/c/users/usuario/desktop/dev/ml/bark/cloning/clonevoice.py", line 5, in from bark.hubert.customtokenizer import CustomTokenizer File "/mnt/c/users/usuario/desktop/dev/ml/bark/bark/hubert/customtokenizer.py", line 155, in def auto_train(data_path, save_path='model.pth', load_model: str | None = None, save_epochs=1, max_epochs=14): TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' It seems as Python is having some kind of bug when reading that Union of types. I've replaced it with typing.Union[str, None] and it worked perfectly. I am submitting this error since it could happen to anyone.

bardak-dev commented 11 months ago

+1