AutoActuary / app-builder

Next iteration of deploy-scripts
0 stars 0 forks source link

Install error when PID doesn't exist anymore #37

Open malankriel opened 1 year ago

malankriel commented 1 year ago
 __     _____ ____ _____ _   _    _    _          _    ____ _____ _   _    _    ____ __   __
 \ \   / /_ _|  _ \_   _| | | |  / \  | |        / \  / ___|_   _| | | |  / \  |  _ \\ \ / /
  \ \ / / | || |_) || | | | | | / _ \ | |       / _ \| |     | | | | | | / _ \ | |_) |\ V /
   \ V /  | ||  _ < | | | |_| |/ ___ \| |___   / ___ \ |___  | | | |_| |/ ___ \|  _ <  | |
    \_/  |___|_| \_\|_|  \___//_/   \_\_____| /_/   \_\____| |_|  \___//_/   \_|_| \_\ |_|

                             In association with Auto Actuary

  [Y]es: continue
  [N]o: cancel the operation

Install and overwrite Autory to C:\Users\malan\AppData\Local\autoactuary\Autory [Y/N]? y
() Uninstalling previous version...
Traceback (most recent call last):
  File "C:\Users\malan\AppData\Local\autoactuary\Autory\bin\python\Lib\site-packages\psutil\_pswindows.py", line 694, in wrapper
    return fun(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\malan\AppData\Local\autoactuary\Autory\bin\python\Lib\site-packages\psutil\_common.py", line 480, in wrapper
    raise raise_from(err, None)
          ^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 3, in raise_from
  File "C:\Users\malan\AppData\Local\autoactuary\Autory\bin\python\Lib\site-packages\psutil\_common.py", line 478, in wrapper
    return fun(self)
           ^^^^^^^^^
  File "C:\Users\malan\AppData\Local\autoactuary\Autory\bin\python\Lib\site-packages\psutil\_pswindows.py", line 781, in exe
    exe = cext.proc_exe(self.pid)
          ^^^^^^^^^^^^^^^^^^^^^^^
ProcessLookupError: [Errno 3] assume no such process (originated from psutil_pid_is_running -> 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\malan\AppData\Local\autoactuary\Autory\tools\deploy-scripts\tools\remove-and-kill-directory.py", line 256, in <module>
    remove_and_kill_directory(args.directory, True)
  File "C:\Users\malan\AppData\Local\autoactuary\Autory\tools\deploy-scripts\tools\remove-and-kill-directory.py", line 207, in remove_and_kill_directory
    locks = get_file_locks()
            ^^^^^^^^^^^^^^^^
  File "C:\Users\malan\AppData\Local\autoactuary\Autory\bin\python\Lib\site-packages\aa_py_core\locked_files.py", line 39, in get_file_locks
    pid = PID(pid=proc.pid, name=proc.name())
                                 ^^^^^^^^^^^
  File "C:\Users\malan\AppData\Local\autoactuary\Autory\bin\python\Lib\site-packages\psutil\__init__.py", line 621, in name
    name = self._proc.name()
           ^^^^^^^^^^^^^^^^^
  File "C:\Users\malan\AppData\Local\autoactuary\Autory\bin\python\Lib\site-packages\psutil\_pswindows.py", line 765, in name
    return os.path.basename(self.exe())
                            ^^^^^^^^^^
  File "C:\Users\malan\AppData\Local\autoactuary\Autory\bin\python\Lib\site-packages\psutil\_pswindows.py", line 696, in wrapper
    raise convert_oserror(err, pid=self.pid, name=self._name)
psutil.NoSuchProcess: process no longer exists (pid=3236)