Skip to content

Process.environ() raise NotImplementedError with 32-bit-WoW processes #1419

Closed
@giampaolo

Description

This bug has been chasing me for years. It should happen when we try to get the environ of a 32-bit-wow processes from a 64-bit process.

======================================================================
ERROR: psutil.tests.test_windows.RemoteProcessTestCase.test_environ_64
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\users\user\desktop\psutil\psutil\tests\test_windows.py", line 778, in test_environ_64
    e = p.environ()
  File "c:\users\user\desktop\psutil\psutil\__init__.py", line 939, in environ
    return self._proc.environ()
  File "c:\users\user\desktop\psutil\psutil\_pswindows.py", line 661, in wrapper
    return fun(self, *args, **kwargs)
  File "c:\users\user\desktop\psutil\psutil\_pswindows.py", line 748, in environ
    ustr = cext.proc_environ(self.pid)
NotImplementedError: NtWow64QueryVirtualMemory64 missing

Instead of NotImplementedError we'll just give up with AccessDenied.

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions