pulsepm / pulse

Unofficial package manager written in python.
MIT License
4 stars 0 forks source link

[BUG]: `uninstall` throws exception #102

Closed Mergevos closed 1 month ago

Mergevos commented 1 month ago

Taken from discord with log:


DEBUG: Starting new HTTPS connection (1): api.github.com:443
DEBUG: https://api.github.com:443 "GET /repos/katursis/pawn.raknet HTTP/1.1" 200 1435
Found resource for katursis/pawn.raknet (sampctl)!
Traceback (most recent call last):
  File "C:\Users\unkov\AppData\Local\Programs\Python\Python310-32\lib\shutil.py", line 595, in _rmtree_unsafe
    with os.scandir(path) as scandir_it:
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\unkov\\Documents\\python\\pulse\\test\\nenene\\requirements\\pawn.raknet'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\unkov\Documents\python\pulse\pulse.py", line 21, in <module>
    pulse()
  File "C:\Users\unkov\Documents\python\pulse\.venv\lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\unkov\Documents\python\pulse\.venv\lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "C:\Users\unkov\Documents\python\pulse\.venv\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\unkov\Documents\python\pulse\.venv\lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\unkov\Documents\python\pulse\.venv\lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\unkov\Documents\python\pulse\pulse\package\package_uninstall.py", line 68, in uninstall
    remove_package(re_package[0], re_package[1])
  File "C:\Users\unkov\Documents\python\pulse\pulse\package\package_uninstall.py", line 129, in remove_package
    shutil.rmtree(os.path.join(REQUIREMENTS_PATH, repo), onerror=package_utils.on_rm_error)
  File "C:\Users\unkov\AppData\Local\Programs\Python\Python310-32\lib\shutil.py", line 747, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Users\unkov\AppData\Local\Programs\Python\Python310-32\lib\shutil.py", line 598, in _rmtree_unsafe
    onerror(os.scandir, path, sys.exc_info())
  File "C:\Users\unkov\Documents\python\pulse\pulse\package\package_utils.py", line 91, in on_rm_error
    os.chmod(path, stat.S_IWRITE)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\unkov\\Documents\\python\\pulse\\test\\nenene\\requirements\\pawn.raknet'```