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

TypeError: memory_maps() takes exactly 2 arguments (1 given) #533

Closed
Ustilago opened this issue Sep 10, 2014 · 1 comment
Closed

TypeError: memory_maps() takes exactly 2 arguments (1 given) #533

Ustilago opened this issue Sep 10, 2014 · 1 comment

Comments

@Ustilago
Copy link

Hi,
I'm having an error on a vserver linux machine that I don't have on my laptop or my raspberry pi, with psutils 2.1.1 and python 2.7.3 on a debian 7 :

>>> import psutil
>>> p = psutil.Process()
>>> p.memory_maps()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ustilago/src/glances-venv/local/lib/python2.7/site-packages/psutil/__init__.py", line 921, in memory_maps
    it = self._proc.memory_maps()
TypeError: memory_maps() takes exactly 2 arguments (1 given)

I know vserver introduces some access restrictions (can't use iptable for instance), but I didn't think it would impact psutils, top and htop commands are working well.

$ python --version
Python 2.7.3
$ uname -a
Linux 2.6.32.22-tl04-grsec2.2.0-vs2.3.0.36.29.6 #1 SMP Sun Oct 3 14:10:24 UTC 2010 x86_64 GNU/Linux

Regards,
Sébastien

@giampaolo
Copy link
Owner

It seems the problem is here:


Basically your system does not provide any /proc/{PID}/smaps file, hence psutil cannot retrieve memory mappings.
NotImplementedError should be raised instead of TypeError though.

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

2 participants