_msi.Record object has no attribute 'GetString'

++imanshu himanshu.garg at gmail.com
Tue Jul 28 00:22:29 EDT 2009


On Jul 27, 4:38 pm, "++imanshu" <himanshu.g... at gmail.com> wrote:
> 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




More information about the Python-list mailing list