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

os.remove PermissionError: [WinError 5] #132

Open
Gaia-X-Alter opened this issue Aug 13, 2022 · 4 comments
Open

os.remove PermissionError: [WinError 5] #132

Gaia-X-Alter opened this issue Aug 13, 2022 · 4 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@Gaia-X-Alter
Copy link

Gaia-X-Alter commented Aug 13, 2022

os.remove(path, *, dir_fd=None)
Remove (delete) the file path. If path is a directory, an IsADirectoryError is raised. Use [rmdir()](https://docs.python.org/3/library/os.html#os.rmdir) to remove directories. If the file does not exist, a FileNotFoundError is raised.

--https://docs.python.org/3/library/os.html

you can not remove a pugin folder via os.remove when the old plugin folder exists

->#17

@theoryshaw
Copy link

This worked for me! Possible to put in a PR with this fix?

@theoryshaw
Copy link

@Mateusz-Grzelinski Mateusz-Grzelinski changed the title PermissionError: [WinError 5] os.remove PermissionError: [WinError 5] Aug 1, 2024
@Mateusz-Grzelinski Mateusz-Grzelinski added bug Something isn't working enhancement New feature or request labels Aug 11, 2024
@zebus3d
Copy link

zebus3d commented Sep 25, 2024

This work for me:

if os.path.exists(link_path):  
        # os.remove(link_path)
        shutil.rmtree(link_path)

@Mateusz-Grzelinski
Copy link
Collaborator

indeed. If also leads to data loss in various cases. https://github.com/JacquesLucke/blender_vscode/blob/master/EXTENSION-SUPPORT.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants