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

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

Open
Maximo-Rulli opened this issue Aug 28, 2023 · 1 comment
Open

Comments

@Maximo-Rulli
Copy link

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
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants