AttributeError: 'NoneType' object has no attribute 'get_text'

Raji Seetharaman sraji.me at gmail.com
Sun Sep 13 19:41:16 CEST 2009


Hi all,
i did a small gui addressbook application using pygtk, python, mysql db. It
was successful.
I tried the same application with glade. But i ended up with errors.
I desgined the code as follows.
1.It has one main window and four child dialogs.
2.In the main window, i have to fill in the text entry widget & if i press
'add', the data will get inserted into the database.This works fine.
3. If showdialog button is clicked, a child dialog appears, where i have to
enter old entry to update.
4. To update, i again use the main window, where i get the following error
                  Traceback (most recent call last):
  File "addressbookglade.py", line 63, in update
    self.ssn = self.wTree.get_widget("ssn"). get_text()
    AttributeError: 'NoneType' object has no attribute 'get_text'

Also i already set the name in properties window.  It works fine for add
option. But not for update option.
Im using the same window for both add and update.

The code is available here http://pastebin.com/m28a4747e
The glade xml file is here http://pastebin.com/m1af61a29
The screenshot of my glade windows are here
http://www.flickr.com/photos/raji_me/?saved=1
 It works fine for add option. But not for update option. Im using the same
window for both add and update.

Raji. S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090913/73c856bd/attachment.html>


More information about the Python-list mailing list