On Friday 11 November 2005 06:56 pm, Jeffrey E. Forcier wrote:
> One trick I've found that helps in debugging is to throw out all  
> assumptions, and to work backwards from a traceback while doing so.
>
> In your case, Python is telling you that what you *think* and what  
> *really ought to be* a DateTime object is instead a string. So,  
> double-check--print out the value of type(object.datetimefield)  
> sometime just prior to where the traceback hits. Do a dir() on it.  
> Stuff like that. It seems dumb and simple but it often helps.
>
> The other thing is to look at the differences between the two  
> environments, or between what you're doing in the prompt and what's  
> happening in the view. Again, throw out assumptions and double-check  
> *everything* surrounding the problem object.
>
> One thing that might help us target specific things going wrong is if  
> you pasted the model class definition, and what specifically you're  
> doing in the prompt to try and simulate the problematic view code.
>
> Regards,
> Jeff

Well said, Jeff.  Thanks for taking the time to give Pedro related tips.  I 
want to help, but am very busy lately so my responses, when I have time to 
give them are terse (hopefully, consise as well).
Best,
Eric.

Reply via email to