-
-
Couldn't load subscription status.
- Fork 1.4k
Open
Labels
Description
Process.open_files() raises IndexError in some linux environment at the following line.
Line 2256 in ea5b556
| flags = int(f.readline().split()[1], 8) |
Specifically, I got the error with Docker python:3.11-slim image running in Google Cloud Run.
The stacktrace:
Traceback (most recent call last):
File "/app/trial/main.py", line 62, in get_psutil_result
res = p.open_files()
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/psutil/__init__.py", line 1210, in open_files
return self._proc.open_files()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/psutil/_pslinux.py", line 1646, in wrapper
return fun(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/psutil/_pslinux.py", line 2256, in open_files
flags = int(f.readline().split()[1], 8)
~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range