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

Windows 8 UTF-8 decoding problem #491

Closed
giampaolo opened this issue May 23, 2014 · 1 comment
Closed

Windows 8 UTF-8 decoding problem #491

giampaolo opened this issue May 23, 2014 · 1 comment

Comments

@giampaolo
Copy link
Owner

From [email protected] on March 31, 2014 15:56:12

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.

Original issue: http://code.google.com/p/psutil/issues/detail?id=491

@giampaolo
Copy link
Owner Author

From g.rodola on March 31, 2014 09:55:14

Closing out as duplicate of issue 446 .

Status: Duplicate
Mergedinto: 446

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

No branches or pull requests

1 participant