Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED]ps_mem.py can not run

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
mfaridi
Posts: 141
Joined: 2005-04-21 07:48
Location: Afghanistan
Contact:

[SOLVED]ps_mem.py can not run

#1 Post by mfaridi »

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

User avatar
thanatos_incarnate
Posts: 717
Joined: 2012-11-04 20:36

Re: ps_mem.py can not run

#2 Post by thanatos_incarnate »

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.

mfaridi
Posts: 141
Joined: 2005-04-21 07:48
Location: Afghanistan
Contact:

Re: ps_mem.py can not run

#3 Post by mfaridi »

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
Contact:

Re: ps_mem.py can not run

#4 Post by mfaridi »

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

Post Reply