Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Error when switching profile #205

Closed
t0mtee opened this issue Nov 6, 2021 · 1 comment · Fixed by #460
Closed

Error when switching profile #205

t0mtee opened this issue Nov 6, 2021 · 1 comment · Fixed by #460

Comments

@t0mtee
Copy link

t0mtee commented Nov 6, 2021

Traceback (most recent call last):
  File "c:\users\tomt0\appdata\local\programs\python\python38\lib\site-packages\bcml\install.py", line 316, in do_and_refresh
    res = func(*args, **kwargs)
  File "c:\users\tomt0\appdata\local\programs\python\python38\lib\site-packages\bcml\_api.py", line 332, in set_profile
    rmtree(mod_dir)
  File "c:\users\tomt0\appdata\local\programs\python\python38\lib\shutil.py", line 740, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "c:\users\tomt0\appdata\local\programs\python\python38\lib\shutil.py", line 622, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())
  File "c:\users\tomt0\appdata\local\programs\python\python38\lib\shutil.py", line 620, in _rmtree_unsafe
    os.rmdir(path)
OSError: [WinError 145] The directory is not empty: 'C:\\Users\\tomt0\\AppData\\Local\\bcml\\mods'

If I load the profile again, it works

@jacobjmarks
Copy link
Contributor

jacobjmarks commented Dec 7, 2022

I've also encountered this issue. I have identified the cause and am investigating a fix.

TLDR: the directory cannot be gracefully removed as the .profile file is being recreated in the background.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants