Opened 6 years ago

Last modified 6 years ago

#13451 closed defect

Invalid format string on all pages containing WikiFormsPlugin — at Initial Version

Reported by: trac@… Owned by:
Priority: normal Component: WikiFormsPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

The example published on https://trac-hacks.org/wiki/WikiFormsPlugin generates following error:

Traceback (most recent call last):
  File "E:\Python2715\lib\site-packages\trac\wiki\formatter.py", line 1191, in _exec_processor
    return processor.process(text)
  File "E:\Python2715\lib\site-packages\trac\wiki\formatter.py", line 364, in process
    text = self.processor(text)
  File "E:\Python2715\lib\site-packages\trac\wiki\formatter.py", line 351, in _macro_processor
    text)
  File "E:\Python2715\lib\site-packages\tracwikiforms-1.0.0.dev0-py2.7.egg\wikiforms\wikiforms.py", line 465, in expand_macro
    req.tz, req.locale)
  File "E:\Python2715\lib\site-packages\trac\util\datefmt.py", line 312, in format_datetime
    return _format_datetime(t, format, tzinfo, locale, 'datetime')
  File "E:\Python2715\lib\site-packages\trac\util\datefmt.py", line 299, in _format_datetime
    return _format_datetime_without_babel(t, format)
  File "E:\Python2715\lib\site-packages\trac\util\datefmt.py", line 246, in _format_datetime_without_babel
    text = t.strftime(str(format))
ValueError: Invalid format string

The problem is in the %T directive (wikiforms\wikiforms.py", line 465) which is unknown for strftime() in Python 2.7.

Change History (0)

Note: See TracTickets for help on using tickets.