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

OSError: [WinError 0] The operation completed successfully #1405

Closed
fenchu opened this issue Feb 8, 2019 · 1 comment
Closed

OSError: [WinError 0] The operation completed successfully #1405

fenchu opened this issue Feb 8, 2019 · 1 comment

Comments

@fenchu
Copy link

fenchu commented Feb 8, 2019

Why does _pswindows.py give this Exception. running as administrator, as plain user it works all fine:
If you had called it OSError.Success I could have filtered it out.

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.18329 N/A Build 18329
    pids = psutil.pids()
    for pid in pids:
        print("process:{}".format(psutil.Process(pid)))
process:psutil.Process(pid=0, name='System Idle Process', started='2019-02-06 17:48:07')
process:psutil.Process(pid=4, name='System', started='2019-02-06 17:48:07')
Traceback (most recent call last):
  File ".\proxylog2elastic.py", line 233, in <module>
    print("process:{}".format(psutil.Process(pid)))
  File "d:\dev\sensiotools\lib\site-packages\psutil\__init__.py", line 395, in __str__
    info["name"] = self.name()
  File "d:\dev\sensiotools\lib\site-packages\psutil\__init__.py", line 609, in name
    name = self._proc.name()
  File "d:\dev\sensiotools\lib\site-packages\psutil\_pswindows.py", line 635, in wrapper
    return fun(self, *args, **kwargs)
  File "d:\dev\sensiotools\lib\site-packages\psutil\_pswindows.py", line 687, in name
    return py2_strencode(os.path.basename(self.exe()))
  File "d:\dev\sensiotools\lib\site-packages\psutil\_pswindows.py", line 635, in wrapper
    return fun(self, *args, **kwargs)
  File "d:\dev\sensiotools\lib\site-packages\psutil\_pswindows.py", line 701, in exe
    return py2_strencode(convert_dos_path(cext.proc_exe(self.pid)))
OSError: [WinError 0] The operation completed successfully

(sensiotools) PS D:\sensio-data\sensiotools\sensiotools\elasticsearch> python.exe
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.__version__
'5.5.0'
@giampaolo
Copy link
Owner

This is a duplicate of #1394. I should be able to release a fixed version next week, as I consider this a high-priority bug. For the time being you may want to downgrade to the previous version.

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

2 participants