baweaver / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

probably wrong str/bytes handling? #456

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Microsoft Windows XP [Verze 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>python
Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:18:40) [MSC v.1600 32 bit (In
tel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> [i.name for i in psutil.process_iter()]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 1, in <listcomp>
  File "c:\python33\lib\site-packages\psutil\_common.py", line 85, in __get__
    ret = self.func(instance)
  File "c:\python33\lib\site-packages\psutil\__init__.py", line 344, in name
    name = self._platform_impl.get_process_name()
  File "c:\python33\lib\site-packages\psutil\_psmswindows.py", line 195, in wrap
per
    return fun(self, *args, **kwargs)
  File "c:\python33\lib\site-packages\psutil\_psmswindows.py", line 227, in get_
process_name
    return os.path.basename(self.get_process_exe())
  File "c:\python33\lib\site-packages\psutil\_psmswindows.py", line 195, in wrap
per
    return fun(self, *args, **kwargs)
  File "c:\python33\lib\site-packages\psutil\_psmswindows.py", line 234, in get_
process_exe
    return _convert_raw_path(_psutil_mswindows.get_process_exe(self.pid))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 88: invalid
 continuation byte
>>>

Original issue reported on code.google.com by radekpod...@gmail.com on 12 Dec 2013 at 4:06

GoogleCodeExporter commented 8 years ago
Fixed in revision 63a711935240.
Thanks for signaling.

Original comment by g.rodola on 12 Dec 2013 at 4:56

GoogleCodeExporter commented 8 years ago
wow! that was fast! thank you. ...hoping for a new release soon. ;-)

Original comment by radekpod...@gmail.com on 12 Dec 2013 at 5:02

GoogleCodeExporter commented 8 years ago
It turns out my fix doesn't work.
Reverted in revision ea33c4f913ac for now.

Original comment by g.rodola on 23 Dec 2013 at 9:25