_msi.Record object has no attribute 'GetString'

I

++imanshu

The documentation (http://docs.python.org/library/msilib.html#record-
objects) for msilib mentions the GetString() method on Record objects.
However, the following snippet :-

db = msilib.OpenDatabase(os.path.join(root, file),
msilib.MSIDBOPEN_READONLY)
view = db.OpenView('SELECT * FROM Property')
view.Execute(None)
r = view.Fetch()
print dir(r)
print r.GetString(0)

gives me this error :-

c:\>python msi.py
['ClearData', 'GetFieldCount', 'SetInteger', 'SetStream', 'SetString',
__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__',
'__init__', '__new__', __reduce__', '__reduce_ex__', '__repr__',
'__setattr__', '__str__']
Traceback (most recent call last):
File "msi.py", line 18, in <module>
print r.GetString(0)
AttributeError: '_msi.Record' object has no attribute 'GetString'

Am I missing something?

Thank You,
Himanshu
 
I

++imanshu

The documentation (http://docs.python.org/library/msilib.html#record-
objects) for msilib mentions the GetString() method on Record objects.
However, the following snippet :-

db = msilib.OpenDatabase(os.path.join(root, file),
msilib.MSIDBOPEN_READONLY)
view = db.OpenView('SELECT * FROM Property')
view.Execute(None)
r = view.Fetch()
print dir(r)
print r.GetString(0)

gives me this error :-

c:\>python msi.py
['ClearData', 'GetFieldCount', 'SetInteger', 'SetStream', 'SetString',
__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__',
'__init__', '__new__', __reduce__', '__reduce_ex__', '__repr__',
'__setattr__', '__str__']
Traceback (most recent call last):
  File "msi.py", line 18, in <module>
    print r.GetString(0)
AttributeError: '_msi.Record' object has no attribute 'GetString'

Am I missing something?

Known Issue. Already fixed here http://mail.python.org/pipermail/python-bugs-list/2008-February/047136.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,076
Latest member
OrderKetoBeez

Latest Threads

Top