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

[Windows] as_dict() failing for win_service_get('WaaSMedicSvc') #2383

Open
ConstantinaElena opened this issue Mar 20, 2024 · 0 comments
Open

Comments

@ConstantinaElena
Copy link

Summary

  • OS: { Win11 }
  • Architecture: { 64bit }
  • Psutil version: { 5.9.8 }
  • Python version: { 3.11.2 }
  • Type: { core }

Description

{{{
as_dict() call fails (only) for "WaaSMedicSvc" service.

python.exe -c "import psutil; srvc = psutil.win_service_get('WaaSMedicSvc'); ret = srvc.as_dict();"

  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Program Files\Python311\Lib\site-packages\psutil\_pswindows.py", line 650, in as_dict
    d['description'] = self.description()
                       ^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\site-packages\psutil\_pswindows.py", line 638, in description
    return py2_strencode(cext.winservice_query_descr(self.name()))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  FileNotFoundError: [WinError 2] The system cannot find the file specified: '(originated from QueryServiceConfig2W)'

}}}

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

1 participant