Open Magniveo opened 1 month ago
try:
os.remove(safetensor_path)
print(f"Removed {safetensor_path}")
os.rename(bin_path, safetensor_path)
print(f"Renamed {bin_path} to {safetensor_path}")
except:
continue
pass
Thanks for reporting! Unfortunately, I don't have a windows machine to test it, but we need to investigate ... Maybe @carmocca can help here as I think he has a non-mac computer.
I use Linux. @Magniveo What's the error you get exactly? Are you able to reproduce the issue in a script that only runs those lines? Do you have proper permissions in that directory?
The error PermissionError: [WinError 5] persists, even after attempting to solve it with administrative privileges.
Does
import shutil
shutil.rmtree(safetensor_path)
work?
Does
import shutil shutil.rmtree(safetensor_path)
work?
Nope, there's another error File "C:\Python312\Lib\shutil.py", line 621, in _rmtree_unsafe with os.scandir(path) as scandir_it: NotADirectoryError: [WinError 267]
My bad. I thought rmtree
worked for files
I use Linux.
Ah my bad, I thought you might have a dual boot or WSL setup. Now I know :)
I have an error in Windows when running
litgpt download --repo_id microsoft/phi-2
The error may be inos.remove(path)