Error: object does not support item assignment

I'm writing a wxPython application to enter data into a postgres table
(using psycopg2). There is a class written by someone else as part of a
database query tool that I'm using to set up the database connection. The
class runs as a stand-alone application. I don't know how to approach
resolving this problem.

   The error stopping the python script is:

Traceback (most recent call last):
   File "./biolwq.py", line 513, in <module>
     frame_1 = OneFrame(None, -1, "")
   File "./biolwq.py", line 59, in __init__
     self.projDB = LoginDialog(self)
   File
"/.../postgresLogin.py",
line 92, in __init__
     data['port']='5432' TypeError: 'OneFrame' object does not support item assignment

   Lines 86-92 in postgresLogin.py are:

if field == 'port':
             try:
                 port_t.SetValue(environ['PGPORT'])
                 data['port']=port_t.GetValue()
             except KeyError:
                 port_t.SetValue('5432')
                 data['port']='5432'

   The postgres port is the only value explicitly set; the others are blank
text control widgets waiting for user input.

   The three source files are about 35K in size. I can provide them but don't
think it appropriate to post all three to the list (5K, 14K, 16K).

Help appreciated,

Rich