Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#14057 closed defect (fixed)

Message extraction fails with Trac 1.4

Reported by: Ryan J Ollos Owned by: Jun Omae
Priority: normal Component: TracDragDropPlugin
Severity: normal Keywords:
Cc: Trac Release:


I ran into this issue while trying to solve #14056:

$ python extract_messages
running extract_messages
extracting messages from tracdragdrop/
extracting messages from tracdragdrop/
extracting messages from tracdragdrop/templates/genshi/tracdragdrop.html
extracting messages from tracdragdrop/templates/jinja2/tracdragdrop.html
Traceback (most recent call last):
  File "", line 47, in <module>
  File "", line 44, in main
  File "/Users/rjollos/.pyenv/versions/trac-2.7/lib/python2.7/site-packages/setuptools/", line 162, in setup
    return distutils.core.setup(**attrs)
  File "/Users/rjollos/.pyenv/versions/2.7.18/lib/python2.7/distutils/", line 151, in setup
  File "/Users/rjollos/.pyenv/versions/2.7.18/lib/python2.7/distutils/", line 953, in run_commands
  File "/Users/rjollos/.pyenv/versions/2.7.18/lib/python2.7/distutils/", line 972, in run_command
  File "/Users/rjollos/.pyenv/versions/trac-2.7/lib/python2.7/site-packages/babel/messages/", line 481, in run
    for filename, lineno, message, comments, context in extracted:
  File "/Users/rjollos/.pyenv/versions/trac-2.7/lib/python2.7/site-packages/babel/messages/", line 157, in extract_from_dir
  File "/Users/rjollos/.pyenv/versions/trac-2.7/lib/python2.7/site-packages/babel/messages/", line 212, in check_and_call_extract_file
  File "/Users/rjollos/.pyenv/versions/trac-2.7/lib/python2.7/site-packages/babel/messages/", line 244, in extract_from_file
    options, strip_comment_tags))
  File "/Users/rjollos/.pyenv/versions/trac-2.7/lib/python2.7/site-packages/babel/messages/", line 325, in extract
    for lineno, funcname, messages, comments in results:
  File "/Users/rjollos/.pyenv/versions/trac-2.7/lib/python2.7/site-packages/genshi/filters/", line 1252, in extract
  File "/Users/rjollos/.pyenv/versions/trac-2.7/lib/python2.7/site-packages/genshi/template/", line 67, in __init__
  File "/Users/rjollos/.pyenv/versions/trac-2.7/lib/python2.7/site-packages/genshi/template/", line 423, in __init__
    raise TemplateSyntaxError(e.msg, self.filepath, e.lineno, e.offset)
genshi.template.base.TemplateSyntaxError: not well-formed (invalid token): line 1, column 1 (/Users/rjollos/Documents/Workspace/trac-dev/trac-hacks/tracdragdropplugin/0.12/tracdragdrop/templates/jinja2/tracdragdrop.html, line 1)
Trac                          1.4.4.dev0 /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git
Babel                         2.9.1

Attachments (0)

Change History (3)

comment:1 Changed 9 months ago by Jun Omae

Status: newaccepted

Thanks for the reporting! I had never extracted messages after supporting the Jinja2 template....

comment:2 Changed 9 months ago by Jun Omae

Resolution: fixed
Status: acceptedclosed

In 18448:

TracDragDropPlugin: fix extract_messages and extract_messages_js failing for Jinja2 templates (closes #14057)

comment:3 Changed 9 months ago by Ryan J Ollos

Thanks for fixing!

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jun Omae.
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.