[Tutor] bug hunting again

Kyle Babich Kyle Babich" <kb@kb5.org
Mon, 8 Jul 2002 19:16:53 +0000


When you run it and it asks for a name put in one of the usernames with
the .custom at the end and any amount of time.  That's where the error
comes in.

On Mon, 08 Jul 2002 14:58:12 -0400, "Lloyd Kvam"
<pythontutor@venix.com> said:
> That worked here!?
> 
> Kyle Babich wrote:
> 
> > Ok now my problem is this:
> > 
> >   File "hourtracker.py", line 92, in ?
> >     if username.lower() in "kyle jason chelsea john cheryl".split():
> > AttributeError: 'string' object has no attribute 'lower'
> > 
> > But I don't see what is wrong.
> > I have attached a new copy.
> > 
> > On Mon, 8 Jul 2002 17:50:25 +0100 , alan.gauld@bt.com said:
> > 
> >>A quick look suggests you don't actually start the 
> >>program anywhere in your file.
> >>
> >>How are you trying to run it?
> >>
> >>
> >>>been working on (from my last few messages).  Something is 
> >>>stopping the program from running 
> >>>
> >>What actually happens? Do you get any errors?
> >>Either from DOS, Windows or Python?
> >>
> >>
> >>>Please tell me if you can find what is stopping the program from
> >>>running.  Thank you.
> >>>
> >>Assuming you want it to run by double clicking the file icon
> >>you will need something like:
> >>
> >>if __name__ == "__main":
> >>    hour()
> >>
> >>If you are importing it into IDLE(say) then you should 
> >>get something back when you type time.hour()
> >>
> >>BUT as somebody already pointed out naming things the same 
> >>as python module names is a bad idea. When you import 
> >>your time module you will hide the python time module.
> >>Rename your file to hourtracker.py or something...
> >>
> >>Slightly confused and needing more info
> >>
> >>Alan G
> >>
> >>
> >>
> >>
> >>
> > 
> > --
> > Kyle
> > 
> 
> 
> -- 
> Lloyd Kvam
> Venix Corp.
> 1 Court Street, Suite 378
> Lebanon, NH 03766-1358
> 
> voice: 
> 603-443-6155
> fax: 
> 801-459-9582
> 
> 
> 
> 
> 

--
Kyle