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) #413

Closed
Ustilago opened this issue Sep 10, 2014 · 5 comments
Closed

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

Ustilago opened this issue Sep 10, 2014 · 5 comments
Labels
Milestone

Comments

@Ustilago
Copy link

Hi,
I've just followed the procedure to install glances dev on a virtual machine (vserver), and I can't start glances (i'm in a virtual env) :

(glances-venv)$ glances -d -C glances/conf/glances.conf
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/ustilago/src/glances/glances/__main__.py", line 38, in <module>
    glances.main()
  File "glances/__init__.py", line 118, in main
    args=core.get_args())
  File "glances/core/glances_standalone.py", line 52, in __init__
    glances_processes.enable_extended()
  File "glances/core/glances_processes.py", line 84, in enable_extended
    self.update()
  File "glances/core/glances_processes.py", line 363, in update
    extended_stats=first)
  File "glances/core/glances_processes.py", line 273, in __get_process_stats
    procstat['memory_swap'] = sum([v.swap for v in proc.memory_maps()])
  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 have nothing in the log file :

2014-09-10 11:03:52,168 -- INFO -- Start Glances 2.1_RC11
2014-09-10 11:03:52,169 -- INFO -- CPython 2.7.3 and PSutil 2.1.1 detected
2014-09-10 11:03:52,176 -- INFO -- Read configuration file /home/ustilago/src/glances/conf/glances.conf
2014-09-10 11:03:52,177 -- INFO -- Start standalone mode
2014-09-10 11:03:52,206 -- DEBUG -- Available plugins list: ['system', 'core', 'now', 'fs', 'monitor', 'percpu', 'mem', 'help', 'uptime', 'load', 'cpu', 'psutilversion', 'memswap', 'diskio', 'hddtemp', 'processcount', 'sensors', 'alert', 'processlist', 'batpercent', 'network']
2014-09-10 11:03:52,206 -- DEBUG -- Monitor plugin configuration detected in the configuration file
2014-09-10 11:03:52,207 -- DEBUG -- Limit maximum displayed processes to 20
2014-09-10 11:03:52,207 -- DEBUG -- Extended stats for top process is enabled (default behavor)

I'm running Debian stable :

(glances-venv)$ python --version
Python 2.7.3
(glances-venv)$ 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

The problem might be linked to access restrictions with vserver.
Regards,
Sébastien

@nicolargo
Copy link
Owner

Can you try the following commands and send me back the result:

$ python
>>> import psutil
>>> p = psutil.Process()
>>> p.memory_maps()

Thks

@Ustilago
Copy link
Author

Here is the result :

>>> 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)

Sébastien

@nicolargo
Copy link
Owner

Looks like a PSUtil issues...

Can you report it to: https://github.com/giampaolo/psutil/issues

@nicolargo nicolargo added the bug label Sep 10, 2014
@nicolargo nicolargo added this to the Next releases milestone Sep 10, 2014
@Ustilago
Copy link
Author

It's reported : giampaolo/psutil#533

@nicolargo
Copy link
Owner

Except added in the latest commit (develop branch).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants