mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion.git
synced 2026-11-05 00:27:21 +00:00
[GH-ISSUE #44] TypeError: expected str, bytes or os.PathLike object, not NoneType #33
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
RVC-Project/Retrieval-based-Voice-Conversion#33
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Dartvauder on GitHub (Sep 18, 2024).
Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion/issues/44
PS C:\NeuroNetworks\NeuroSandboxWebUI\inputs\audio\rvc_models\Retrieval-based-Voice-Conversion> rvc infer -m "C:\NeuroNetworks\NeuroSandboxWebUI\inputs\audio\rvc_models\Oxxxymiron_v2_1020e\Oxxxymiron_e1020_s19380.pth" -i "input.wav" -o "output.wav"
2024-09-18 21:00:58 | INFO | rvc.configs.config | No supported Nvidia GPU found
2024-09-18 21:00:58 | INFO | rvc.configs.config | overwrite configs.json
2024-09-18 21:00:58 | INFO | rvc.configs.config | Use cpu instead
2024-09-18 21:00:58 | INFO | rvc.configs.config | is_half:False, device:cpu
2024-09-18 21:00:58 | INFO | rvc.modules.vc.modules | Get sid: Oxxxymiron_e1020_s19380.pth
2024-09-18 21:00:58 | INFO | rvc.modules.vc.modules | Loading: C:\NeuroNetworks\NeuroSandboxWebUI\inputs\audio\rvc_models\Oxxxymiron_v2_1020e\Oxxxymiron_e1020_s19380.pth
C:\Users\dartv\AppData\Local\Programs\Python\Python310\lib\site-packages\rvc\modules\vc\modules.py:50: FutureWarning: You are using
torch.loadwithweights_only=False(the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value forweights_onlywill be flipped toTrue. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user viatorch.serialization.add_safe_globals. We recommend you start settingweights_only=Truefor any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.self.cpt = torch.load(person, map_location="cpu")
C:\Users\dartv\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\utils\weight_norm.py:134: FutureWarning:
torch.nn.utils.weight_normis deprecated in favor oftorch.nn.utils.parametrizations.weight_norm.WeightNorm.apply(module, name, dim)
Traceback (most recent call last):
File "C:\Users\dartv\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\dartv\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\dartv\AppData\Local\Programs\Python\Python310\Scripts\rvc.exe_main.py", line 7, in
File "C:\Users\dartv\AppData\Local\Programs\Python\Python310\lib\site-packages\rvc\wrapper\cli\cli.py", line 29, in main
cli()
File "C:\Users\dartv\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "C:\Users\dartv\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\dartv\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\dartv\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\dartv\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "C:\Users\dartv\AppData\Local\Programs\Python\Python310\lib\site-packages\rvc\wrapper\cli\handler\infer.py", line 114, in infer
vc.get_vc(modelpath)
File "C:\Users\dartv\AppData\Local\Programs\Python\Python310\lib\site-packages\rvc\modules\vc\modules.py", line 83, in get_vc
index = get_index_path_from_model(sid)
File "C:\Users\dartv\AppData\Local\Programs\Python\Python310\lib\site-packages\rvc\modules\vc\utils.py", line 12, in get_index_path_from_model
for root, _, files in os.walk(os.getenv("index_root"), topdown=False)
File "C:\Users\dartv\AppData\Local\Programs\Python\Python310\lib\os.py", line 343, in walk
return _walk(fspath(top), topdown, onerror, followlinks)
TypeError: expected str, bytes or os.PathLike object, not NoneType
@alcoftTAO commented on GitHub (Sep 18, 2024):
I think the problem might be the
index_rootenvironment variable is not set.Try typing in the PowerShell
$env:index_root = ""and running RVC again.If it still fails, try typing
$env:index_root = (Get-Location)and running RVC again.I don't know if this can fix it or if this is really a solution. It worked for me, but I'm using the Python library and I'm on Linux, I have no idea if this works on Windows.