[Tutor] debugging problem

Watt III, Glenn gwatt3@backbonesecurity.com
Mon, 12 Aug 2002 08:39:44 -0400


ok heres my problem i run the script for the first proram listed call
coll.py it runs into an error that says
	"Traceback (most recent call last):
	  File "\\Bbserver4\test\admin\newdesign\papers\cgi\coll.py",
line 113, in ?
	    mainAction()
	  File "\\Bbserver4\test\admin\newdesign\papers\cgi\coll.py",
line 18, in mainAction
	    email =3D backbone.reqField("email", "E-mail Address")
	AttributeError: 'module' object has no attribute 'reqField'"
however there is an atribute called reqField in the backbone module as
you can see in the second program listed what am i doin wron as usual
thanks for any help



	coll:
#!/usr/local/bin/python


import MySQLdb
import cgi
import sys
import backboner


cgiForm =3D cgi.FieldStorage()

err =3D ""
wrong =3D 0


def mainAction():
    global backbone
    email =3D backbone.reqField("email", "E-mail Address")



	backbone:
#!/usr/local/bin/python

err =3D ""
wrong =3D 0

cgiForm =3D cgi.FieldStorage()

# A checker for any required fields input is the name of the cgi
variable response is what the user sees if it gets thrown back


def reqField(input, response):
    global wrong
    global err
    if cgiForm.has_key(input):
        input =3D cgiForm[input].value
        return input
    elif wrong =3D=3D 1:
        err =3D err + ', ' + response
    else:
        err =3D response
        wrong =3D 1