datetime 'NoneType' sporadic error

Carl Banks pavlovevidence at gmail.com
Fri Dec 11 18:16:58 EST 2009


On Dec 11, 12:33 pm, bfrederi <brfrederi... at 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



More information about the Python-list mailing list