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

PermissionError: [WinError 32] #199

Open
f-amerehi opened this issue Nov 7, 2023 · 3 comments
Open

PermissionError: [WinError 32] #199

f-amerehi opened this issue Nov 7, 2023 · 3 comments

Comments

@f-amerehi
Copy link

Hi @mingukkang, POSTECH-CVLab team,

I'm encountering a PermissionError while trying to run the following command on a Windows machine with PyTorch 2.1.0 and a single NVIDIA GPU.

python src/main.py -sf -sf_num 100 -metrics none -cfg src/configs/CIFAR10/DCGAN.yaml -data data/CIFAR10 -ckpt checkpts/DCGAN_CIFAR10 -save results_cifar/cifar10

I have already downloaded the CIFAR10 dataset and the DCGAN checkpoints. Below, you can find the error message I'm getting. how I can fix this issue?

Traceback (most recent call last):
  File "C:\Projects\PyTorch-StudioGAN\src\main.py", line 192, in <module>
    loader.load_worker(local_rank=rank,
  File "C:\Projects\PyTorch-StudioGAN\src\loader.py", line 235, in load_worker
    os.remove(join(cfgs.RUN.save_dir, "logs", run_name + ".log"))
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'results_cifar/cifar10\\logs\\CIFAR10-DCGAN-train-2023_11_07_15_36_39.log'

Thank you very much.

@HolyAkisy
Copy link

I encountered the same problem on Windows as well. Have you already found a solution to this issue?

@f-amerehi
Copy link
Author

Hi @HolyAkisy, As a temporary workaround you can comment the error line in the src/loader.py as it's not too much important. it's just a log clearance

#if local_rank == 0:
#   os.remove(join(cfgs.RUN.save_dir, "logs", run_name + ".log"))

You can also use the forked repo https://github.com/f-amerehi/PyTorch_StudioGAN

@HolyAkisy
Copy link

Hi @HolyAkisy, As a temporary workaround you can comment the error line in the src/loader.py as it's not too much important. it's just a log clearance

#if local_rank == 0:
#   os.remove(join(cfgs.RUN.save_dir, "logs", run_name + ".log"))

You can also use the forked repo https://github.com/f-amerehi/PyTorch_StudioGAN

It's working now, thanks for your help.

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