On 25/07/2012 18:23, Carlos Hotmail wrote:
Hi all on the list.

The following question is regarding an error that raises when i try to execute 
this script:
import _winreg
import wmi

r = wmi.Registry ()
result, names = r.EnumKey (
   hDefKey=_winreg.HKEY_LOCAL_MACHINE,
   sSubKeyName="Software"
)
for key in names:
   print key and this is the error message it give me:

Traceback (most recent call last):
   File "C:\Python27\wmitest8.py", line 7, in <module>
     sSubKeyName="Software"
   File "C:\Python27\lib\site-packages\wmi.py", line 431, in __call__
     handle_com_error ()
   File "C:\Python27\lib\site-packages\wmi.py", line 241, in handle_com_error
     raise klass (com_error=err)
x_wmi: <x_wmi: Unexpected COM Error (-2147352567, 'Ocurri\xf3 una excepci\xf3n.', 
(0, u'SWbemProperty', u'Los tipos no coinciden ', None, 0, -2147217403), None)>

I can't see any issue on Win7 Python 2.7

If you still can't get it to work, could you produce a dump of the interpreter session in case something's getting lost in translation?

TJG
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to