trac template errors - need urgent help

29 views
Skip to first unread message

Ralph

unread,
Feb 7, 2024, 3:55:09 PMFeb 7
to Trac Users
I have a production trac 1.4 server running on AWS ec2 AL2 which went crazy an hour ago and I cannot figure out why. All trac pages produce template errors, for example:

Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/trac/web/main.py", line 684, in _send_error data, metadata) File "/usr/lib/python2.7/site-packages/trac/web/chrome.py", line 1443, in render_template fragment, iterable, method) File "/usr/lib/python2.7/site-packages/trac/web/chrome.py", line 1497, in _render_jinja_template domain) File "/usr/lib/python2.7/site-packages/trac/web/chrome.py", line 1607, in prepare_template template = self._load_jinja_template(filename, text) File "/usr/lib/python2.7/site-packages/trac/web/chrome.py", line 1398, in _load_jinja_template return (self.jenv_text if text else self.jenv).get_template(filename) File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 791, in get_template return self._load_template(name, self.make_globals(globals)) File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 765, in _load_template template = self.loader.load(self, name, globals) File "/usr/lib/python2.7/site-packages/jinja2/loaders.py", line 125, in load code = environment.compile(source, name, filename) File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 554, in compile self.handle_exception(exc_info, source_hint=source) File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python2.7/site-packages/trac/templates/error.html", line 118, in template # set project_admin TemplateSyntaxError: expected token '=', got 'end of statement block'

I've attached a piece of the log for more info, any suggestions would be greatly appreciated!
trac.log

Ralph Ewig

unread,
Feb 7, 2024, 3:58:42 PMFeb 7
to 'Ralph' via Trac Users

This took a while to show on Google groups, and I was able to solve it in the mean time. The jinja2 lib was corrupted so a reinstall via pip fixed the issue. Still not sure what caused it though.

--
You received this message because you are subscribed to a topic in the Google Groups "Trac Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/trac-users/6zoNSZKP_T0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to trac-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/b06e37d9-184f-48ca-ab6c-07c05a87eedbn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages