Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OS] iSH IndexError: list index out of range #1868

Closed
alitrack opened this issue Nov 1, 2020 · 6 comments
Closed

[OS] iSH IndexError: list index out of range #1868

alitrack opened this issue Nov 1, 2020 · 6 comments
Labels

Comments

@alitrack
Copy link

alitrack commented Nov 1, 2020

Platform

  • { OS version }
    Alpine Linux v3.12 x86(iSH 1.0.1)
  • { psutil version: python3 -c "import psutil; print(psutil.version)" }
    5.7.3
  • { python version }
    3.8.5

Bug description
when run

import os
from psutil import Process
proc = Process(os.getpid())

gets,

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/psutil/_common.py", line 446, in wrapper
    ret = self._cache[fun]
AttributeError: _cache

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/psutil/__init__.py", line 324, in __init__
    self._init(pid)
  File "/usr/lib/python3.8/site-packages/psutil/__init__.py", line 352, in _init
    self.create_time()
  File "/usr/lib/python3.8/site-packages/psutil/__init__.py", line 708, in create_time
    self._create_time = self._proc.create_time()
  File "/usr/lib/python3.8/site-packages/psutil/_pslinux.py", line 1517, in wrapper
    return fun(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/psutil/_pslinux.py", line 1729, in create_time
    ctime = float(self._parse_stat_file()['create_time'])
  File "/usr/lib/python3.8/site-packages/psutil/_pslinux.py", line 1517, in wrapper
    return fun(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/psutil/_common.py", line 449, in wrapper
    return fun(self)
  File "/usr/lib/python3.8/site-packages/psutil/_pslinux.py", line 1578, in _parse_stat_file
    ret['cpu_num'] = fields[36]
IndexError: list index out of range

Test results
{ output of python -c psutil.tests (failures only, not full result) }

@alitrack alitrack added the bug label Nov 1, 2020
@giampaolo
Copy link
Owner

Mmmm please paste the output of cat /proc/self/stat.

@alitrack
Copy link
Author

alitrack commented Nov 1, 2020

277 (cat) R 4 277 2 34816 277 0 0 0 0 0 0 0 0 0 20 0 1 0 0 0 0 0 0 0 4294958624 0 0 0 0 0 0 0 0 0 17

@giampaolo
Copy link
Owner

giampaolo commented Nov 1, 2020

Your system has 38 fields, Linux Mint has 52. :-
I wonder why so many are missing.

@alitrack
Copy link
Author

alitrack commented Nov 1, 2020

maybe need ask iSH for help.

@alitrack
Copy link
Author

alitrack commented Nov 1, 2020

I checked alpine-standard-3.12.1-x86.iso, no this kind issue.

and iSH has another issue,

line 'btime' not found in /proc/stat

@giampaolo
Copy link
Owner

If this is the iSH you're referring to:
https://github.com/ish-app/ish
...then I have no idea, but it's not a platform officially supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants