marinho/geraldo — Issue #9: FYI: TypeError: strftime() argument 1 must be str, not unicode
Author: phoebebright
Created: 2011-12-07 15:45:50+00:00
State: open

File "/usr/lib/python2.5/site-packages/Geraldo-0.4.14-py2.5.egg/geraldo/utils.py", line 119, in format_date
return date.strftime(expression)
TypeError: strftime() argument 1 must be str, not unicode

I got this error when I moved the code to the production server, although it was fine on development server. To fix it I just changed the line in utils.py to convert expression to string. Not sure if this is a fix that should be put into the main code or if the real problem is one of my settings somewhere...

Line 118 in utils.py

return date.strftime(str(expression))