This isn’t the first time this has happened to me so now I’m looking for an answer because I’m completely stumped.
I have code running in a production environment for over 3 months now and it worked absolutely fine, then out of no where I started to get errors in python.
'method_descriptor' object has no attribute 'today'
Exception Value:
'method_descriptor' object has no attribute 'today'
Exception Location: /admin/views/create.py in process, line 114
/admin/views/create.py in process
order = Orders(uid=0, accepted=0, canview='', files=0, date=datetime.date.today(), due=dueDate,
As you can see, I’m using the following which works absolutely fine from the python shell:
>>> import datetime
>>> datetime.date.today()
>>> datetime.date(2011, 9, 27)
Your code is importing
datetime.datetimesomewhere, instead of justdatetime, e.g.from datetime import datetime.