Retrieval-based-Voice-Conversion-WebUI icon indicating copy to clipboard operation
Retrieval-based-Voice-Conversion-WebUI copied to clipboard

TypeError: expected str, bytes or os.PathLike object, not NoneType

Open Ahmad4kTesting opened this issue 1 year ago • 6 comments

I can't get the infer-web.py to run in a venv for python

python3 infer-web.py --pycmd python3
2024-05-31 20:10:01 | INFO | configs.config | Found GPU NVIDIA GeForce RTX 3060
2024-05-31 20:10:01 | INFO | configs.config | Half-precision floating-point: True, device: cuda:0
2024-05-31 20:10:03 | INFO | httpx | HTTP Request: GET https://api.gradio.app/gradio-messaging/en "HTTP/1.1 200 OK"
2024-05-31 20:10:04 | INFO | __main__ | Use Language: en_US
Traceback (most recent call last):
  File "/home/user01/AI/RVC/infer-web.py", line 138, in <module>
    for root, dirs, files in os.walk(index_root, topdown=False):
  File "/usr/lib/python3.9/os.py", line 342, in walk
    return _walk(fspath(top), topdown, onerror, followlinks)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Can someone point me to the right direction? I'm new to linux and would appreciate the help

Ahmad4kTesting avatar May 31 '24 17:05 Ahmad4kTesting

Tried a new install and again I have a problem with infer-web.py

python3 infer-web.py --pycmd python3
2024-06-01 00:51:50 | INFO | configs.config | Found GPU NVIDIA GeForce RTX 3060
is_half:True, device:cuda:0
2024-06-01 00:51:53 | INFO | httpx | HTTP Request: GET https://api.gradio.app/gradio-messaging/en "HTTP/1.1 200 OK"
Traceback (most recent call last):
  File "/home/user01/AI/RVC/infer-web.py", line 57, in <module>
    if not config.nocheck:
AttributeError: 'Config' object has no attribute 'nocheck'

Different problem with the same file! I tried to use an earlier release version of infer-web.py but it was the worst solution.

Any ideas or pointers are much appreciated

Ahmad4kTesting avatar May 31 '24 21:05 Ahmad4kTesting

A different version of infer-web.py from hugging face

python3 infer-web.py --pycmd python3
2024-06-01 01:16:33 | INFO | configs.config | Found GPU NVIDIA GeForce RTX 3060
2024-06-01 01:16:33 | INFO | configs.config | Half-precision floating-point: True, device: cuda:0
2024-06-01 01:16:35 | INFO | httpx | HTTP Request: GET https://api.gradio.app/gradio-messaging/en "HTTP/1.1 200 OK"
2024-06-01 01:16:36 | INFO | infer.lib.rvcmd | checking hubret & rmvpe...
2024-06-01 01:16:39 | INFO | infer.lib.rvcmd | checking pretrained models...
2024-06-01 01:16:44 | INFO | infer.lib.rvcmd | checking pretrained models v2...
2024-06-01 01:16:50 | INFO | infer.lib.rvcmd | checking uvr5_weights...
2024-06-01 01:17:00 | INFO | infer.lib.rvcmd | all assets are already latest.
2024-06-01 01:17:00 | INFO | __main__ | Use Language: en_US
Traceback (most recent call last):
  File "/home/user01/AI/RVC/infer-web.py", line 153, in <module>
    lookup_indices(index_root)
  File "/home/user01/AI/RVC/infer-web.py", line 147, in lookup_indices
    for root, dirs, files in os.walk(index_root, topdown=False):
  File "/usr/lib/python3.9/os.py", line 342, in walk
    return _walk(fspath(top), topdown, onerror, followlinks)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Is it the file?!

Ahmad4kTesting avatar May 31 '24 22:05 Ahmad4kTesting

Make sure you have ffmpeg installed at the root directory of rvc (as mentioned in the docs). It seems like the program cannot read the audio files currently (it needs ffmpeg to process audio files).

ic1149 avatar Jun 02 '24 09:06 ic1149

It is not ffmpeg

destination path 'ffmpeg' already exists and is not an empty directory.

Can't get past this:

Traceback (most recent call last):
  File "/home/user01/AI/RVC/infer-web.py", line 153, in <module>
    lookup_indices(index_root)
  File "/home/user01/AI/RVC/infer-web.py", line 147, in lookup_indices
    for root, dirs, files in os.walk(index_root, topdown=False):
  File "/usr/lib/python3.9/os.py", line 342, in walk
    return _walk(fspath(top), topdown, onerror, followlinks)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Ahmad4kTesting avatar Jun 13 '24 23:06 Ahmad4kTesting

ffmpeg.exe must be in the root directory of RVC. Have you made sure it's there? I am not too sure what you mean by not an empty directory.

ic1149 avatar Jun 14 '24 06:06 ic1149

@Ahmad4kTesting I solved this by deleting the .env file and create a new one from original repo.

RUI-LONG avatar Sep 17 '24 03:09 RUI-LONG

+1. I have ffmpeg at root, tried replacing the .env file, and even doing a whole reinstall as another user mentioned. I'm at my wits end here. I repetitively get the error that the OP opened with. Same file, same line trigger (line 342/343).

maoyaodev avatar Oct 10 '24 21:10 maoyaodev

#2345 Is what solved this issue on my end. It is in fact directly related to .env. You need to make sure the file is hidden, otherwise RVC won't be able to recognize it. It installs as unhidden on some OSes (Linux, in my case) by default.

maoyaodev avatar Oct 11 '24 21:10 maoyaodev

pip install gradio==3.48.0

RitterKW avatar Dec 04 '24 16:12 RitterKW