You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. install python 3.4 and psutil 2.0.0 on Windows 8
2. create system_infos.py file with the following line:
import psutil
net_info=psutil.network_io_counters(pernic=True)
print(str(net_info))
3. python system_infos.py
What is the expected output?
{'lo': snetio(bytes_sent=112432, bytes_recv=112432, packets_sent=804,
packets_recv=804, errin=0, errout=0, dropin=0, dropout=0), 'wlan0':
snetio(bytes_sent=0, bytes_recv=0, packets_sent=0, packets_recv=0, errin=0,
errout=0, dropin=0, dropout=0), 'eth1': snetio(bytes_sent=1228441,
bytes_recv=17944089, packets_sent=7654, packets_recv=24378, errin=0, errout=0,
dropin=0, dropout=0), 'eth0': snetio(bytes_sent=0, bytes_recv=0,
packets_sent=0, packets_recv=0, errin=0, errout=0, dropin=0, dropout=0)}
What do you see instead?
Traceback (most recent call last):
File "f:\system_infos.py", line 49, in <module>
net_info=psutil.network_io_counters(pernic=True)
File "c:\Python34\lib\site-packages\psutil\_common.py", line 125, in inner
return fun(*args, **kwargs)
File "c:\Python34\lib\site-packages\psutil\__init__.py", line 1855, in network
_io_counters
return net_io_counters(pernic)
File "c:\Python34\lib\site-packages\psutil\__init__.py", line 1758, in net_io_
counters
rawdict = _psplatform.net_io_counters()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe1 in position 11: invalid
continuation byte
What version of psutil are you using?
2.0.0
What Python version?
3.4
On what operating system?
Windows 8
Is it 32bit or 64bit version?
64bit
Please provide any additional information below.
It works perfectly on Windows 7 and Ubuntu 12.04.
From [email protected] on March 31, 2014 15:56:12
Original issue: http://code.google.com/p/psutil/issues/detail?id=491
The text was updated successfully, but these errors were encountered: