[SOLVED]ps_mem.py can not run

Need help with C, C++, perl, python, etc?

[SOLVED]ps_mem.py can not run

Postby mfaridi » 2015-08-20 17:19

I use debian testing and I use Gnome 3 , yesterday I install KDE4 but can not work good , so remove KDE with this command
Code: Select all
apt-get remove kdelibs-bin kdelibs5-data

before I use Gnome3 , I use mate . so I remove all gnome with these command
Code: Select all
aptitude purge `dpkg --get-selections | grep gnome | cut -f 1`
aptitude -f install
aptitude purge `dpkg --get-selections | grep deinstall | cut -f 1`
aptitude -f install

and after this I install gnome 3
before install gnome 3 ps_mem.py work good and I do not have problem , but . today when I run this script , I see this error
Code: Select all
 Private  +   Shared  =  RAM used   Program

Traceback (most recent call last):
  File "/usr/local/sbin/ps_mem.py", line 485, in <module>
    sorted_cmds, shareds, count, total = get_memory_usage( pids_to_show, split_args )
  File "/usr/local/sbin/ps_mem.py", line 395, in get_memory_usage
    private, shared, mem_id = getMemStats(pid)
  File "/usr/local/sbin/ps_mem.py", line 227, in getMemStats
    digester.update(line.encode('latin1'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd8 in position 103: ordinal not in range(128)

and this script can not run and work.
Last edited by mfaridi on 2015-09-17 09:40, edited 1 time in total.
life is linux and debian is live
mfaridi
 
Posts: 141
Joined: 2005-04-21 07:48
Location: Afghanistan

Re: ps_mem.py can not run

Postby thanatos_incarnate » 2015-08-20 17:59

Sounds like a problem with unicode according to this.
Maybe the upgrade messed up your language encoding?
I'm no programmer, so this is just a hunch.
User avatar
thanatos_incarnate
 
Posts: 717
Joined: 2012-11-04 20:36

Re: ps_mem.py can not run

Postby mfaridi » 2015-08-20 19:12

How I can tell python use unicode ?
I need help
life is linux and debian is live
mfaridi
 
Posts: 141
Joined: 2005-04-21 07:48
Location: Afghanistan

Re: ps_mem.py can not run

Postby mfaridi » 2015-09-17 09:39

I get new ps-mem.py from git and install it and I do not see this error and this script work good.I think it was problem with script.
life is linux and debian is live
mfaridi
 
Posts: 141
Joined: 2005-04-21 07:48
Location: Afghanistan


Return to Programming

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable