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

[QUESTION] Error When Create New Workspace at train tab #137

Closed
tikhonlavrev opened this issue Sep 18, 2023 · 15 comments
Closed

[QUESTION] Error When Create New Workspace at train tab #137

tikhonlavrev opened this issue Sep 18, 2023 · 15 comments
Labels
help wanted Extra attention is needed user question A question is asked by a user.

Comments

@tikhonlavrev
Copy link

I got this error when I'm trying to create new workspace

Traceback (most recent call last):
File "F:\audio-webui\venv\lib\site-packages\gradio\routes.py", line 437, in run_predict
output = await app.get_blocks().process_api(
File "F:\audio-webui\venv\lib\site-packages\gradio\blocks.py", line 1352, in process_api
result = await self.call_function(
File "F:\audio-webui\venv\lib\site-packages\gradio\blocks.py", line 1077, in call_function
prediction = await anyio.to_thread.run_sync(
File "F:\audio-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "F:\audio-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "F:\audio-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run
result = context.run(func, *args)
File "F:\audio-webui\webui\ui\tabs\training\rvc.py", line 112, in create_workspace
rvc_ws.current_workspace = rvc_ws.RvcWorkspace(name).create({
File "F:\audio-webui\webui\ui\tabs\training\training\rvc_workspace.py", line 66, in create
download_base_models(data_in['vsr'])
File "F:\audio-webui\webui\ui\tabs\training\training\rvc_workspace.py", line 935, in download_base_models
huggingface_hub.hf_hub_download(repo, file, subfolder=sf,
File "F:\audio-webui\venv\lib\site-packages\huggingface_hub\utils_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "F:\audio-webui\venv\lib\site-packages\huggingface_hub\file_download.py", line 1427, in hf_hub_download
_check_disk_space(expected_size, local_dir)
File "F:\audio-webui\venv\lib\site-packages\huggingface_hub\file_download.py", line 975, in _check_disk_space
target_dir_free = shutil.disk_usage(target_dir).free
File "C:\Users\tikhonlavrev\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 1341, in disk_usage
total, free = nt._getdiskusage(path)
FileNotFoundError: [WinError 3] The system cannot find the path specified

Maybe it is bug?, because 2 weeks ago I didn't get this messages

@tikhonlavrev tikhonlavrev added the user question A question is asked by a user. label Sep 18, 2023
@gitmylo
Copy link
Owner

gitmylo commented Sep 18, 2023

I'm not sure what could be causing this, the error looks like it comes from huggingface hub trying to download a file, and checking available disk space first, but something seems to have went wrong.

You could try reinstalling, or simply deleting the venv folder, running the update.bat, then launching the webui again, it will reinstall the packages, and hopefully work this time

@d3c0deFPV
Copy link

I'm getting this as well on a fresh install and after running update.bat.

@gitmylo
Copy link
Owner

gitmylo commented Sep 19, 2023

Have you tried installing on a different disk? Maybe the partitioning of your F drive is breaking something.

@tikhonlavrev
Copy link
Author

Have you tried installing on a different disk? Maybe the partitioning of your F drive is breaking something.

I've tried using C:/, but same result

@d3c0deFPV
Copy link

d3c0deFPV commented Sep 19, 2023

Same, I was using D: but just did a fresh install on C: and I'm getting the same error

  File "C:\audio-webui\venv\lib\site-packages\gradio\routes.py", line 437, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\audio-webui\venv\lib\site-packages\gradio\blocks.py", line 1352, in process_api
    result = await self.call_function(
  File "C:\audio-webui\venv\lib\site-packages\gradio\blocks.py", line 1077, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\audio-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\audio-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "C:\audio-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\audio-webui\webui\ui\tabs\training\rvc.py", line 112, in create_workspace
    rvc_ws.current_workspace = rvc_ws.RvcWorkspace(name).create({
  File "C:\audio-webui\webui\ui\tabs\training\training\rvc_workspace.py", line 66, in create
    download_base_models(data_in['vsr'])
  File "C:\audio-webui\webui\ui\tabs\training\training\rvc_workspace.py", line 935, in download_base_models
    huggingface_hub.hf_hub_download(repo, file, subfolder=sf,
  File "C:\audio-webui\venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 118, in _inner_fn
    return fn(*args, **kwargs)
  File "C:\audio-webui\venv\lib\site-packages\huggingface_hub\file_download.py", line 1427, in hf_hub_download
    _check_disk_space(expected_size, local_dir)
  File "C:\audio-webui\venv\lib\site-packages\huggingface_hub\file_download.py", line 975, in _check_disk_space
    target_dir_free = shutil.disk_usage(target_dir).free
  File "C:\Python310\lib\shutil.py", line 1341, in disk_usage
    total, free = nt._getdiskusage(path)
FileNotFoundError: [WinError 3] The system cannot find the path specified

@tikhonlavrev
Copy link
Author

I'm not sure what could be causing this, the error looks like it comes from huggingface hub trying to download a file, and checking available disk space first, but something seems to have went wrong.

You could try reinstalling, or simply deleting the venv folder, running the update.bat, then launching the webui again, it will reinstall the packages, and hopefully work this time

I've tried this too, Same error after reinstalling the and run update.bat

@gitmylo gitmylo added the help wanted Extra attention is needed label Sep 19, 2023
@gitmylo
Copy link
Owner

gitmylo commented Sep 19, 2023

It might have been caused by huggingface-hub updating yesterday.

https://pypi.org/project/huggingface-hub/#history

I will lock the requirement to 0.17.1 (before yesterday's update), this should work

@gitmylo
Copy link
Owner

gitmylo commented Sep 19, 2023

I have just pushed a commit which could fix this issue, please update me on if it fixes this issue.

@d3c0deFPV
Copy link

d3c0deFPV commented Sep 19, 2023

No change after pulling 7f84d19

Currently working around it by removing the disk space check on line 1427. The checks above it using the same function don't seem to error out.

@tikhonlavrev
Copy link
Author

I have just pushed a commit which could fix this issue, please update me on if it fixes this issue.

Same error still happened

@d3c0deFPV
Copy link

Something that may be obvious but worth noting is that after working around that and the download completes I can remove the workaround and there are no issues.

So you may not see it on anything but a fresh install or on a system where this hasn't been downloaded yet.

@gitmylo
Copy link
Owner

gitmylo commented Sep 19, 2023

I will attempt to reproduce it, but since i'm on linux, and don't have quick access to a windows machine, i'm not sure if i can reproduce it, but we'll see.

@gitmylo
Copy link
Owner

gitmylo commented Sep 19, 2023

I have an idea for a fix, i could monkeypatch _check_disk_space() on line 964 in huggingface-hub's file_download.py to keep the original function, but add a try catch around it. so it won't crash, a bit of a hacky fix, but it should do it.

@gitmylo
Copy link
Owner

gitmylo commented Sep 19, 2023

Alright, i've pushed that change, it shouldn't crash anymore now.

@d3c0deFPV
Copy link

d3c0deFPV commented Sep 19, 2023

Workaround works. I was able to download without the error after clearing cache. Thanks!

@gitmylo gitmylo closed this as completed Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed user question A question is asked by a user.
Projects
None yet
Development

No branches or pull requests

3 participants