Opened 6 years ago

Closed 6 years ago

#13451 closed defect (fixed)

Invalid format string on all pages containing WikiFormsPlugin

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

Description (last modified by Ryan J Ollos)

The example published on WikiFormsPlugin generates following error:

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

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

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by trac@…

The problem appears after the first submit.

comment:2 Changed 6 years ago by Ryan J Ollos

Description: modified (diff)
Owner: set to Ryan J Ollos
Status: newaccepted

comment:3 Changed 6 years ago by Ryan J Ollos

Works for me on OSX, but looks like a Windows vs Linux/Unix difference: SO:26140502.

comment:4 Changed 6 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 17238:

TracWikiForms 1.0.0dev: Fix windows incompatibility

The %T format code does not exist on Windows.

Fixes #13451.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.