strftime() argument 1 must be str, not unicode

Alexandr N Zamaraev tonal at promsoft.ru
Wed May 7 03:07:35 EDT 2008


Subj is bag?

Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> from datetime import datetime
 >>> datetime.today().strftime('%Y_%m_%d %H_%M_%S.csv')
'2008_05_07 12_30_22.csv'
 >>> datetime.today().strftime(u'%Y_%m_%d %H_%M_%S.csv')
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
TypeError: strftime() argument 1 must be str, not unicode



More information about the Python-list mailing list