[python-win32] Error while listing the Installed Software using wmi module
siddhartha veedaluru
siddhartha.veedaluru at gmail.com
Fri May 30 08:19:00 CEST 2008
Hi all,
The following code snippet gives the error
import wmi
c = wmi.WMI()
for i in c.Win32_Product():
print i.Name
Output
-----------
Windows Installer Clean Up
Python 2.5.1
Debugging Tools for Windows
Windows Resource Kit Tools
Adobe Reader 8.1.2
Java(TM) SE Runtime Environment 6
Java(TM) 6 Update 3
Traceback (most recent call last):
File "C:\PyWork\test8.py", line 4, in <module>
print i.Name
File "C:\Python25\lib\encodings\cp437.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\xae' in
position 5: character maps to <undefined>
regards,
Siddhartha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20080530/f42a0c18/attachment.htm>
More information about the python-win32
mailing list