Skip to content

PermissionError: [WinError 32]  #199

Open

Description

@f-amerehi

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.

Activity

  1. HolyAkisy commented on Dec 28, 2023

    @HolyAkisy

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

  2. f-amerehi commented on Dec 28, 2023

    @f-amerehi
    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

  3. HolyAkisy commented on Dec 29, 2023

    @HolyAkisy

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions