Skip to content

process.children(recursive=True) could rise Type error #1353

Description

@deploy-adbeat
  File "worker_health_monitoring.py", line 30, in get_processes_data
    children_processes = process.children(recursive=True)
  File "~/.pyenv/versions/3.6.6/lib/python3.6/site-packages/psutil/__init__.py", line 343, in wrapper
    return fun(self, *args, **kwargs)
  File "~/.pyenv/versions/3.6.6/lib/python3.6/site-packages/psutil/__init__.py", line 964, in children
    for p in process_iter():
  File "~/.pyenv/versions/3.6.6/lib/python3.6/site-packages/psutil/__init__.py", line 1484, in process_iter
    list(dict.fromkeys(new_pids).items())):
TypeError: '<' not supported between instances of 'NoneType' and 'Process'

Python version 3.6.6. psutil version: 5.2.2
Probably some of the new_pids returned None instead of Process

Metadata

Metadata

Assignees

No one assigned

    Labels

    badexcpsutil raises something other than NoSuchProcess, AccessDenied, ZombieProcess or TimeoutExpiredbugtype

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions