You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
psutil is crashing on macos whereas it is working on Windows 11
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/psutil/_common.py", line 443, in wrapper
ret = self._cache[fun]
^^^^^^^^^^^
AttributeError: 'Process' object has no attribute '_cache'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/psutil/_common.py", line 443, in wrapper
ret = self._cache[fun]
^^^^^^^^^^^
AttributeError: 'Process' object has no attribute '_cache'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/psutil/_psosx.py", line 346, in wrapper
return fun(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/psutil/_common.py", line 446, in wrapper
return fun(self)
^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/psutil/_psosx.py", line 381, in _get_pidtaskinfo
ret = cext.proc_pidtaskinfo_oneshot(self.pid)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ProcessLookupError: [Errno 3] No such process (originated from proc_pidinfo())
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/midknight/Documents/CAU/2nd_semester/Search&Optimisation/tp/lab2/searchopt_lab2/main.py", line 190, in <module>
p_bytes = pu.Process(p.pid).memory_info().rss
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/psutil/_common.py", line 446, in wrapper
return fun(self)
^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/psutil/__init__.py", line 1058, in memory_info
return self._proc.memory_info()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/psutil/_psosx.py", line 346, in wrapper
return fun(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/psutil/_psosx.py", line 446, in memory_info
rawtuple = self._get_pidtaskinfo()
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/psutil/_psosx.py", line 351, in wrapper
raise NoSuchProcess(self.pid, self._name)
psutil.NoSuchProcess: process no longer exists (pid=3531)
The text was updated successfully, but these errors were encountered:
Processes can disappear at any time, so you should always be ready to catch NoSuchProcess in a try/except. This would be a bug if NoSuchProcess is raised but process still exist (pid_exists() returning True).
Summary
Description
psutil is crashing on macos whereas it is working on Windows 11
The text was updated successfully, but these errors were encountered: