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

[win10] access denied 5.7.0, 5.6.2 worked #1723

Open
MXS2514 opened this issue Apr 1, 2020 · 1 comment
Open

[win10] access denied 5.7.0, 5.6.2 worked #1723

MXS2514 opened this issue Apr 1, 2020 · 1 comment

Comments

@MXS2514
Copy link

MXS2514 commented Apr 1, 2020

windows

  • { win10 1803 x64 }
  • { psutil version: 5.7.0 }
  • { python version 3.7.2 32bit }

Bug description

import psutil
import subprocess
import time


processnames = []


for process in psutil.process_iter():

    processnames.append(process.name())
    

Test results

============ RESTART: C:/Users/Administrator/Desktop/untitled.py ============
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\psutil\_common.py", line 449, in wrapper
    ret = self._cache[fun]
AttributeError: _cache

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\psutil\_pswindows.py", line 679, in wrapper
    return fun(self, *args, **kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\psutil\_common.py", line 452, in wrapper
    return fun(self)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\psutil\_pswindows.py", line 766, in exe
    exe = cext.proc_exe(self.pid)
PermissionError: [WinError 24] 程序发出命令,但命令长度不正确。: '(originated from NtQuerySystemInformation)'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/Administrator/Desktop/untitled.py", line 11, in <module>
    processnames.append(process.name())
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\psutil\__init__.py", line 630, in name
    name = self._proc.name()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\psutil\_pswindows.py", line 750, in name
    return os.path.basename(self.exe())
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\psutil\_pswindows.py", line 681, in wrapper
    raise convert_oserror(err, pid=self.pid, name=self._name)
psutil.AccessDenied: psutil.AccessDenied (pid=8336)
>>> 

which, pid=8336 is WindowsInternal.ComposableShell.Experiences.TextInput.InputApp.exe
downgrade psutil to 5.6.2 worked

@MXS2514 MXS2514 added the bug label Apr 1, 2020
@fengerzh
Copy link

confirmed. 5.6.7 cannot work, but 5.6.2 can work.

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

No branches or pull requests

3 participants