[DB-SIG] dbiDate - help urgently needed

Chris Cogdon chris at cogdon.org
Mon Jun 2 17:38:57 EDT 2003


On Monday, Jun 2, 2003, at 16:29 US/Pacific, Jeff Sacksteder wrote:

>> What output are you getting for the second 'for' loop?
>
>
> Traceback (most recent call last):
>  File "C:\Python21\Pythonwin\pywin\framework\scriptutils.py", line 
> 301, in RunScript
>    exec codeObject in __main__.__dict__
>  File "C:\Documents and 
> Settings\jwsacksteder.RAM_PRECISION\Desktop\etl.py", line 120, in ?
>    process_table(move_table)
>  File "C:\Documents and 
> Settings\jwsacksteder.RAM_PRECISION\Desktop\etl.py", line 72, in 
> process_table
>    elif isinstance(row_item,DbiDate):
> NameError: global name 'DbiDate' is not defined

Ah, right. And that makes sense given Lloyd's recent response. 
'DbiDate' is not a real type, or a real anything. I suspect that 
'typing' the object is returning something misleading.

Two morals from this story:

1. If you're getting error messages, always tell us what the error 
message is straight away. If it's long and wordy, then perhaps just the 
last few stack entries. Having error messages saves us from going down 
unnecessary paths.

2. Don't 'fake' output by, say, hand transposing it from your screen 
into your mail program. There are nuances and subtleties in the output, 
sometimes that if mis-copied will lead an 'expert' down the wrong path. 
That's frustrating. If you've created code to do something, then cut 
and paste that code and output exactly.

-- 
    ("`-/")_.-'"``-._        Chris Cogdon <chris at cogdon.org>
     . . `; -._    )-;-,_`)
    (v_,)'  _  )`-.\  ``-'
   _.- _..-_/ / ((.'
((,.-'   ((,/   fL




More information about the DB-SIG mailing list