Psutil version: { Name: psutil
Version: 5.9.6 (from git)
Summary: Cross-platform lib for process and system monitoring in Python.
Home-page: https://github.com/giampaolo/psutil
Author: Giampaolo Rodola
Author-email: g.rodola@gmail.com
License: BSD-3-Clause
Location: C:\Users\shinrax2\AppData\Roaming\Python\Python311\site-packages
Requires:
Required-by: } also tried 5.9.5 from pypi
Python version: { Python 3.11.4 64bit, installed via pyenv-win }
Type: { core }
Description
Traceback (most recent call last):
File "C:\Users\shinrax2\AppData\Roaming\Python\Python311\site-packages\psutil\_pswindows.py", line 797, in cmdline
ret = cext.proc_cmdline(self.pid, use_peb=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [WinError 5] Zugriff verweigert: '(originated from OpenProcess)'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\shinrax2\AppData\Roaming\Python\Python311\site-packages\psutil\_pswindows.py", line 696, in wrapper
return fun(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\shinrax2\AppData\Roaming\Python\Python311\site-packages\psutil\_pswindows.py", line 712, in wrapper
return fun(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\shinrax2\AppData\Roaming\Python\Python311\site-packages\psutil\_pswindows.py", line 800, in cmdline
ret = cext.proc_cmdline(self.pid, use_peb=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [WinError 5] Zugriff verweigert: '(originated from OpenProcess)'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\shinrax2\Documents\GitHub\PS3GameUpdateDownloader\dist\PS3GameUpdateDownloaderDebug\updater.py", line 23, in
utils.waitForMainAppExit()
File "C:\Users\shinrax2\Documents\GitHub\PS3GameUpdateDownloader\dist\PS3GameUpdateDownloaderDebug\utils.py", line 385, in waitForMainAppExit
if exename in p.name().lower() or exename in (' '.join(p.cmdline()).lower()):
^^^^^^^^^^^
File "C:\Users\shinrax2\AppData\Roaming\Python\Python311\site-packages\psutil\__init__.py", line 705, in cmdline
return self._proc.cmdline()
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\shinrax2\AppData\Roaming\Python\Python311\site-packages\psutil\_pswindows.py", line 698, in wrapper
raise convert_oserror(err, pid=self.pid, name=self._name)
psutil.AccessDenied: (pid=148, name='Registry')
Traceback
import psutil
def waitForMainAppExit():
exename = (getExecutableBasename()+getExecutableSuffix()).lower()
print(f"looking for {exename}")
pid = None
sleep_interval = 0.05
for p in psutil.process_iter(attrs=["pid", "name"]):
if exename in p.name().lower() or exename in (' '.join(p.cmdline()).lower()):
pid = p.pid()
print(f"found {exename} with pid: {pid}")
if pid is not None:
print(f"waiting for {exename} with interval of {sleep_interval}s")
while psutil.pid_exists(pid) == True:
time.sleep(sleep_interval)
utils.waitForMainAppExit() (reproduction code)
Additionally i tried running the code as administrator but that didn't change anything.
If anymore info is required please @ me
Summary
Description
Traceback
utils.waitForMainAppExit() (reproduction code)
Additionally i tried running the code as administrator but that didn't change anything. If anymore info is required please @ me