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

./benchmark --languages=C++ fails: AttributeError: 'Process' object has no attribute '_cache' #10

Closed
timotheecour opened this issue Apr 24, 2021 · 4 comments

Comments

@timotheecour
Copy link
Contributor

pip3 install psutil
Collecting psutil
Downloading psutil-5.8.0-cp39-cp39-macosx_10_9_x86_64.whl (236 kB)
|████████████████████████████████| 236 kB 1.6 MB/s
Installing collected packages: psutil
Successfully installed psutil-5.8.0

python3 --version
Python 3.9.4

./benchmark --languages=C++
# Code-generation:
- Generating generated/c++/main.c++ took 0.135 seconds (C++)
- Generating generated/c++/main_t.c++ took 0.135 seconds (C++)

# Benchmark:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/psutil/_common.py", line 447, in wrapper
    ret = self._cache[fun]
AttributeError: 'Process' object has no attribute '_cache'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/psutil/_common.py", line 447, in wrapper
    ret = self._cache[fun]
AttributeError: _cache

During handling of the above exception, another exception occurred:

@ringabout
Copy link
Contributor

ringabout commented Apr 24, 2021

a similar issue
giampaolo/psutil#1765

And giampaolo/psutil#1826

It seems that psutils doesn't have full features on Macos.

@Gerardwx
Copy link

Gerardwx commented Sep 15, 2022

I received this once on Linux.Python 3.9.5 (default, Nov 23 2021, 15:27:38) . It originated from the _logger.debug line below.

```

for p in psutil.process_iter(attrs=('pid', 'ppid', 'exe', 'cmdline')):
if 'ssh' == p.name():
_logger.debug(f"{p.pid} {p.ppid()} {p.exe()} {p.cmdline()}")

uname -a
Linux vncbridge.usnan.org 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu-Server 20.04.3 LTS amd64 customized using Cubic on 2021-10-21 16:47"

[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.__version__
'5.9.2'

@nordlow
Copy link
Owner

nordlow commented Sep 15, 2022

I unfortunately not have resources to test on more than recent stable Ubuntu. PRs are always welcome.

@nordlow
Copy link
Owner

nordlow commented Feb 1, 2024

I'm closing this for now.

@nordlow nordlow closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants