If you just do a plain vanilla 'import datetime' then you need to call datetime.datetime.now, not datetime.now.