Prev: __mul__ vs __rmul__ (and others) priority for different classes
Next: Spawning an interactive interpreter in a running python process?
From: bfrederi on 11 Dec 2009 15:33 When using the datetime module, I sporadically get " 'NoneType' object has no attribute 'datetime' " on line 40: http://dpaste.com/hold/132156/ Sorry, I don't have the traceback, this is an error that was sent to me by one of the users. It only happens occasionally. Any ideas?
From: Carl Banks on 11 Dec 2009 18:16
On Dec 11, 12:33 pm, bfrederi <brfrederi...(a)gmail.com> wrote: > When using the datetime module, I sporadically get " 'NoneType' object > has no attribute 'datetime' " on line 40:http://dpaste.com/hold/132156/ > > Sorry, I don't have the traceback, this is an error that was sent to > me by one of the users. It only happens occasionally. My guess is somewhere in your code the symbol datetime is being used as a variable. That is, you're doing something like datetime = x. This shadows the module. Carl Banks |