[Tutor] Building Starships -- object of type 'int' has no len()

Dave Angel davea at davea.name
Fri Aug 15 22:05:55 CEST 2014


Terry--gmail <terry.kemmerer at gmail.com> Wrote in message:
>
> 
Please don't post here in html mail. Tell your email program to
 use text. Your program fragment displayed here as a mess, which
 is one of many problems with html. 

Please use reply-list (or whatever your email supports,  like
 reply-all and remove the extra recipients) when adding a message
 to a thread.  By starting a new thread,  you've robbed us of
 context. 

Now to your code, which I can't see because of the html message. 

Don't use bare except,  unless that's throwaway code designed only
 to uncover the type mismatch. 

I couldn't see enough of your code to figure where you're messing
 up a type.  But you should probably write a validation function
 to make sure all the fields are of expected types, and call it
 before and after the update to narrow down the culprit.
 

-- 
DaveA



More information about the Tutor mailing list