[GH-ISSUE #1445] AttributeError: 'NoneType' object has no attribute 'pipeline' #936

Open
opened 2026-10-20 10:04:21 +00:00 by bsakaguchi · 17 comments
Owner

Originally created by @kevin-guimard-ext on GitHub (Oct 19, 2023).
Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1445

Hello,

I ran the GUI and, in inference mode, selected an index file of a pretrained model and the path of the audio file to be processed. But I run into the following error:

2023-10-19 09:33:29 | WARNING | infer.modules.vc.modules | Traceback (most recent call last):
  File "/home/jupyter/Retrieval-based-Voice-Conversion-WebUI/infer/modules/vc/modules.py", line 185, in vc_single
    audio_opt = self.pipeline.pipeline(
AttributeError: 'NoneType' object has no attribute 'pipeline'

Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/gradio/routes.py", line 437, in run_predict
    output = await app.get_blocks().process_api(
  File "/opt/conda/lib/python3.10/site-packages/gradio/blocks.py", line 1349, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "/opt/conda/lib/python3.10/site-packages/gradio/blocks.py", line 1283, in postprocess_data
    prediction_value = block.postprocess(prediction_value)
  File "/opt/conda/lib/python3.10/site-packages/gradio/components.py", line 2586, in postprocess
    file_path = self.audio_to_temp_file(
  File "/opt/conda/lib/python3.10/site-packages/gradio/components.py", line 360, in audio_to_temp_file
    temp_dir = Path(dir) / self.hash_bytes(data.tobytes())
AttributeError: 'NoneType' object has no attribute 'tobytes'```

Another question, don't I have to input a pth file also?

Thanks,
Kevin
Originally created by @kevin-guimard-ext on GitHub (Oct 19, 2023). Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1445 Hello, I ran the GUI and, in inference mode, selected an index file of a pretrained model and the path of the audio file to be processed. But I run into the following error: ``` 2023-10-19 09:33:29 | WARNING | infer.modules.vc.modules | Traceback (most recent call last): File "/home/jupyter/Retrieval-based-Voice-Conversion-WebUI/infer/modules/vc/modules.py", line 185, in vc_single audio_opt = self.pipeline.pipeline( AttributeError: 'NoneType' object has no attribute 'pipeline' Traceback (most recent call last): File "/opt/conda/lib/python3.10/site-packages/gradio/routes.py", line 437, in run_predict output = await app.get_blocks().process_api( File "/opt/conda/lib/python3.10/site-packages/gradio/blocks.py", line 1349, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "/opt/conda/lib/python3.10/site-packages/gradio/blocks.py", line 1283, in postprocess_data prediction_value = block.postprocess(prediction_value) File "/opt/conda/lib/python3.10/site-packages/gradio/components.py", line 2586, in postprocess file_path = self.audio_to_temp_file( File "/opt/conda/lib/python3.10/site-packages/gradio/components.py", line 360, in audio_to_temp_file temp_dir = Path(dir) / self.hash_bytes(data.tobytes()) AttributeError: 'NoneType' object has no attribute 'tobytes'``` Another question, don't I have to input a pth file also? Thanks, Kevin
Author
Owner

@Misaka-Mikodo commented on GitHub (Oct 28, 2023):

I had the same problem.

<!-- gh-comment-id:1783759534 --> @Misaka-Mikodo commented on GitHub (Oct 28, 2023): I had the same problem.
Author
Owner

@marshalleq commented on GitHub (Dec 14, 2023):

And did you manage to fix it?

<!-- gh-comment-id:1855330623 --> @marshalleq commented on GitHub (Dec 14, 2023): And did you manage to fix it?
Author
Owner

@OmangoItai commented on GitHub (Feb 1, 2024):

+1 hope a solution

<!-- gh-comment-id:1922386900 --> @OmangoItai commented on GitHub (Feb 1, 2024): +1 hope a solution
Author
Owner

@faustofonseca commented on GitHub (Mar 17, 2024):

I have the same exact issue on my mac.

<!-- gh-comment-id:2002392393 --> @faustofonseca commented on GitHub (Mar 17, 2024): I have the same exact issue on my mac.
Author
Owner

@Tessory commented on GitHub (Mar 24, 2024):

Yes, it's strange bug. Sometimes I also saw that error, in that case I choose one standard model and convert one mp3 file, after that choose back custom model and it begin work fine without error... until I restart RVC server

<!-- gh-comment-id:2016699870 --> @Tessory commented on GitHub (Mar 24, 2024): Yes, it's strange bug. Sometimes I also saw that error, in that case I choose one standard model and convert one mp3 file, after that choose back custom model and it begin work fine without error... until I restart RVC server
Author
Owner

@PJaekel93 commented on GitHub (Apr 24, 2024):

any news on this? Bug still persist, having the same issue. Tried a lot of things without success.

<!-- gh-comment-id:2074487537 --> @PJaekel93 commented on GitHub (Apr 24, 2024): any news on this? Bug still persist, having the same issue. Tried a lot of things without success.
Author
Owner

@Tr-AIL commented on GitHub (May 9, 2024):

I guess it's because the program cannot parse non-windows file paths. I checked similar error analysis articles, which mentioned this. I encountered the same error under Linux, but everything was normal under Windows.

<!-- gh-comment-id:2102333213 --> @Tr-AIL commented on GitHub (May 9, 2024): I guess it's because the program cannot parse non-windows file paths. I checked similar error analysis articles, which mentioned this. I encountered the same error under Linux, but everything was normal under Windows.
Author
Owner

@faustofonseca commented on GitHub (May 9, 2024):

@Tr-AIL thats an interesting point. But would that mean that no one actually made this work on Mac or Linux? I always assumed since the tutorial talks about Mac. Or do you mean the paths that we provide in the UI?

<!-- gh-comment-id:2102351866 --> @faustofonseca commented on GitHub (May 9, 2024): @Tr-AIL thats an interesting point. But would that mean that no one actually made this work on Mac or Linux? I always assumed since the tutorial talks about Mac. Or do you mean the paths that we provide in the UI?
Author
Owner

@PJaekel93 commented on GitHub (May 9, 2024):

thanks for replying. I managed to find a solution for myself and got it running, it might have had multiple reasons. The error originates from a problem where an asset is not correctly loaded.

  1. Wrong file paths: indeed in one of the earlier versions the filepath was wrong. It was fixed in a later update and should work now.
  2. Fault on my side, wrong use of the program. I did not run the full train, so the dropdown to chose a voice was empty. If any asset that is needed is empty it might throw the above mentioned error.
<!-- gh-comment-id:2102386392 --> @PJaekel93 commented on GitHub (May 9, 2024): thanks for replying. I managed to find a solution for myself and got it running, it might have had multiple reasons. The error originates from a problem where an asset is not correctly loaded. 1. Wrong file paths: indeed in one of the earlier versions the filepath was wrong. It was fixed in a later update and should work now. 2. Fault on my side, wrong use of the program. I did not run the full train, so the dropdown to chose a voice was empty. If any asset that is needed is empty it might throw the above mentioned error.
Author
Owner

@faustofonseca commented on GitHub (May 9, 2024):

Oh, nice. Thank you for sharing!

On Thu, 9 May 2024 at 11:22, Patrik Jäkel @.***> wrote:

thanks for replying. I managed to find a solution for myself and got it
running, it might have had multiple reasons. The error originates from a
problem where an asset is not correctly loaded.

  1. Wrong file paths: indeed in one of the earlier versions the
    filepath was wrong. It was fixed in a later update and should work now.
  2. Fault on my side, wrong use of the program. I did not run the full
    train, so the dropdown to chose a voice was empty. If any asset that is
    needed is empty it might throw the above mentioned error.

—
Reply to this email directly, view it on GitHub
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1445#issuecomment-2102386392,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALIUFQX2BQK7YI22SNIN4QTZBNE6JAVCNFSM6AAAAAA6G3SPL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBSGM4DMMZZGI
.
You are receiving this because you commented.Message ID:
<RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1445/2102386392
@github.com>

<!-- gh-comment-id:2102393381 --> @faustofonseca commented on GitHub (May 9, 2024): Oh, nice. Thank you for sharing! On Thu, 9 May 2024 at 11:22, Patrik Jäkel ***@***.***> wrote: > thanks for replying. I managed to find a solution for myself and got it > running, it might have had multiple reasons. The error originates from a > problem where an asset is not correctly loaded. > > 1. Wrong file paths: indeed in one of the earlier versions the > filepath was wrong. It was fixed in a later update and should work now. > 2. Fault on my side, wrong use of the program. I did not run the full > train, so the dropdown to chose a voice was empty. If any asset that is > needed is empty it might throw the above mentioned error. > > — > Reply to this email directly, view it on GitHub > <https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1445#issuecomment-2102386392>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ALIUFQX2BQK7YI22SNIN4QTZBNE6JAVCNFSM6AAAAAA6G3SPL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBSGM4DMMZZGI> > . > You are receiving this because you commented.Message ID: > <RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/1445/2102386392 > @github.com> >
Author
Owner

@PJaekel93 commented on GitHub (May 9, 2024):

@faustofonseca theres an asset that detects the used system. So it should work in all systems in theory, it might occur that this is not correctly set and you get the problems with file paths. A general issue with that was fixed in commit fb16ba36b9
see Issue #2011

<!-- gh-comment-id:2102395337 --> @PJaekel93 commented on GitHub (May 9, 2024): @faustofonseca theres an asset that detects the used system. So it should work in all systems in theory, it might occur that this is not correctly set and you get the problems with file paths. A general issue with that was fixed in commit fb16ba36b9d867d8551e6255bee39086ae4ab348 see Issue #2011
Author
Owner

@artemious3 commented on GitHub (May 18, 2024):

Make sure that the .pth model file is placed into assets/weights/<NAME>.pth, and .index model file is logs/<NAME>/added_<...>.index
Notice that .pth file name and folder name in logs are the same.

<!-- gh-comment-id:2118906646 --> @artemious3 commented on GitHub (May 18, 2024): Make sure that the .pth model file is placed into `assets/weights/<NAME>.pth`, and .index model file is `logs/<NAME>/added_<...>.index` Notice that .pth file name and folder name in logs are the same.
Author
Owner

@sankexin commented on GitHub (Jul 19, 2024):

solution:

image

image

2024-07-19 17:06:03 | INFO | infer.modules.vc.modules | Loading: assets/weights/mi-test.pth
2024-07-19 17:06:04 | INFO | infer.modules.vc.modules | Select index: logs/mi-test/added_IVF1043_Flat_nprobe_1_mi-test_v2.index
2024-07-19 17:06:44 | INFO | infer.modules.vc.pipeline | Loading rmvpe model,assets/rmvpe/rmvpe.pt

<!-- gh-comment-id:2238724365 --> @sankexin commented on GitHub (Jul 19, 2024): solution: ![image](https://github.com/user-attachments/assets/8c02bc9e-da02-4f3f-9b78-aa7805f4e657) ![image](https://github.com/user-attachments/assets/650842a1-0b7e-4c97-8b28-cd2379d504f7) 2024-07-19 17:06:03 | INFO | infer.modules.vc.modules | Loading: assets/weights/mi-test.pth 2024-07-19 17:06:04 | INFO | infer.modules.vc.modules | Select index: logs/mi-test/added_IVF1043_Flat_nprobe_1_mi-test_v2.index 2024-07-19 17:06:44 | INFO | infer.modules.vc.pipeline | Loading rmvpe model,assets/rmvpe/rmvpe.pt
Author
Owner

@chuksum commented on GitHub (Aug 8, 2024):

Reinstalling the exact packages in the requirements.txt fixed it on my end :

pip install -r requirements.txt

Some versions had mismatches and caused these weird types of incompatibility glitches.

<!-- gh-comment-id:2276535149 --> @chuksum commented on GitHub (Aug 8, 2024): Reinstalling the exact packages in the requirements.txt fixed it on my end : `pip install -r requirements.txt` Some versions had mismatches and caused these weird types of incompatibility glitches.
Author
Owner

@wayne931121 commented on GitHub (Sep 30, 2025):

Hello, today I meet this problem, and it is my solution:

  1. see error code:
  File "C:\ai\lib\site-packages\gradio\queueing.py", line 745, in process_events
    response = await route_utils.call_process_api(
  File "C:\ai\lib\site-packages\gradio\route_utils.py", line 354, in call_process_api
    output = await app.get_blocks().process_api(
  File "C:\ai\lib\site-packages\gradio\blocks.py", line 2127, in process_api
    data = await self.postprocess_data(block_fn, result["prediction"], state)
  File "C:\ai\lib\site-packages\gradio\blocks.py", line 1904, in postprocess_data
    prediction_value = block.postprocess(prediction_value)
  File "C:\ai\lib\site-packages\gradio\components\audio.py", line 316, in postprocess
    file_path = processing_utils.save_audio_to_cache(
  File "C:\ai\lib\site-packages\gradio\processing_utils.py", line 182, in save_audio_to_cache
    temp_dir = Path(cache_dir) / hash_bytes(data.tobytes())
AttributeError: 'NoneType' object has no attribute 'tobytes'
  1. you can found that it is the gradio problem

  2. reinstall correct gradio, i install gradio==3.34.0 in
    https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/requirements.txt

  3. find more problem:
    (maybe you will not meet this problem, my some package version is different with requirements.txt, because i want to use this env for other projects, so please check the solution above, if not work, continue to below.)

pydantic_core._pydantic_core.ValidationError: 1 validation error for PredictBody event_id Field required [type=missing, input_value={'data': ['describe this ...on_hash': 'ncvk1jrssin'}, input_type=dict] 
  1. search in internet, get result
    https://github.com/gradio-app/gradio/issues/6914

  2. run the code

pip install gradio==3.50.2
  1. success fix this
<!-- gh-comment-id:3352562439 --> @wayne931121 commented on GitHub (Sep 30, 2025): Hello, today I meet this problem, and it is my solution: 1. see error code: ``` File "C:\ai\lib\site-packages\gradio\queueing.py", line 745, in process_events response = await route_utils.call_process_api( File "C:\ai\lib\site-packages\gradio\route_utils.py", line 354, in call_process_api output = await app.get_blocks().process_api( File "C:\ai\lib\site-packages\gradio\blocks.py", line 2127, in process_api data = await self.postprocess_data(block_fn, result["prediction"], state) File "C:\ai\lib\site-packages\gradio\blocks.py", line 1904, in postprocess_data prediction_value = block.postprocess(prediction_value) File "C:\ai\lib\site-packages\gradio\components\audio.py", line 316, in postprocess file_path = processing_utils.save_audio_to_cache( File "C:\ai\lib\site-packages\gradio\processing_utils.py", line 182, in save_audio_to_cache temp_dir = Path(cache_dir) / hash_bytes(data.tobytes()) AttributeError: 'NoneType' object has no attribute 'tobytes' ``` 2. you can found that it is the gradio problem 3. reinstall correct gradio, i install gradio==3.34.0 in https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/requirements.txt 4. find more problem: (maybe you will not meet this problem, my some package version is different with requirements.txt, because i want to use this env for other projects, so please check the solution above, if not work, continue to below.) ``` pydantic_core._pydantic_core.ValidationError: 1 validation error for PredictBody event_id Field required [type=missing, input_value={'data': ['describe this ...on_hash': 'ncvk1jrssin'}, input_type=dict] ``` 5. search in internet, get result https://github.com/gradio-app/gradio/issues/6914 6. run the code ``` pip install gradio==3.50.2 ``` 7. success fix this
Author
Owner

@Leon-LihongWang commented on GitHub (Jan 12, 2026):

solution:

image

image

2024-07-19 17:06:03 | INFO | infer.modules.vc.modules | Loading: assets/weights/mi-test.pth 2024-07-19 17:06:04 | INFO | infer.modules.vc.modules | Select index: logs/mi-test/added_IVF1043_Flat_nprobe_1_mi-test_v2.index 2024-07-19 17:06:44 | INFO | infer.modules.vc.pipeline | Loading rmvpe model,assets/rmvpe/rmvpe.pt

This approach is very close to the correct solution. I noticed that if I open a fresh browser window after running python infer-web.py and perform the operation there, the error no longer occurs. However, if I reuse a previously opened browser tab/window (with parameters already filled in) and click the button again, the error is triggered.

<!-- gh-comment-id:3737133971 --> @Leon-LihongWang commented on GitHub (Jan 12, 2026): > solution: > > ![image](https://github.com/user-attachments/assets/8c02bc9e-da02-4f3f-9b78-aa7805f4e657) > > ![image](https://github.com/user-attachments/assets/650842a1-0b7e-4c97-8b28-cd2379d504f7) > > 2024-07-19 17:06:03 | INFO | infer.modules.vc.modules | Loading: assets/weights/mi-test.pth 2024-07-19 17:06:04 | INFO | infer.modules.vc.modules | Select index: logs/mi-test/added_IVF1043_Flat_nprobe_1_mi-test_v2.index 2024-07-19 17:06:44 | INFO | infer.modules.vc.pipeline | Loading rmvpe model,assets/rmvpe/rmvpe.pt This approach is very close to the correct solution. I noticed that if I **open a fresh browser window** after running `python infer-web.py` and perform the operation there, the error no longer occurs. However, if I reuse a previously opened browser tab/window (with parameters already filled in) and click the button again, the error is triggered.
Author
Owner

@sankexin commented on GitHub (Jan 12, 2026):

这是来自QQ邮箱的假期自动回复邮件。
 
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

<!-- gh-comment-id:3737135776 --> @sankexin commented on GitHub (Jan 12, 2026): 这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
RVC-Project/Retrieval-based-Voice-Conversion-WebUI#936
No description provided.