[SRU] trac crashes while importing a library in Ubuntu 20.04 (ImportError: cannot import name 'soft_unicode' from 'jinja2.utils')
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
trac (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[ Impact ]
trac is completely unusable as it will fail with the below error whenever any user tries to run "tracd" or "trac-admin":
Traceback (most recent call last):
File "/usr/bin/tracd", line 33, in <module>
sys.
File "/usr/bin/tracd", line 25, in importlib_
return next(matches)
File "/usr/lib/
module = import_
File "/usr/lib/
return _bootstrap.
File "<frozen importlib.
File "<frozen importlib.
File "<frozen importlib.
File "<frozen importlib.
File "<frozen importlib.
File "<frozen importlib.
File "/usr/lib/
from trac.web.auth import BasicAuthentica
File "/usr/lib/
from trac.web.chrome import Chrome, INavigationCont
File "/usr/lib/
from trac.mimeview.api import RenderingContext, get_mimetype
File "/usr/lib/
from trac.mimeview.api import *
File "/usr/lib/
from trac.resource import Resource
File "/usr/lib/
from trac.util.
File "/usr/lib/
from jinja2.utils import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'jinja2.utils' (/usr/lib/
[ Test Plan ]
* Simple test:
- Execute "tracd --help" or "tracd"
- Execute "trac-admin --help" or "trac-admin"
- If its not fixed then both the commands will fail as the error above
- With fixed package both the commands will show the help message.
* More comprehensive test: (execute the following as root)
- mkdir -p /var/lib/trac
- trac-admin /var/lib/
- Enter some project name when prompted
- Leave default sqlite DB (just press enter)
- echo -n "tracadmin:
- trac-admin /var/lib/
- tracd --port 8080 --auth=
- open http://
[ Where problems could occur ]
It is not changing any part of the code, its only importing the module with the new name and so there is minimum chance of any regression.
[racb] We're adjusting imports of soft_unicode/
[ Other Info ]
- The Ubuntu patch is a combination of portions of two upstream but related changes.
- One of the upstream changes mentions about an AssertionError for jinja, so it will be great if this can be tested by a real user of trac. The testplan only checks the server starts and is working.
[ Original Bug Description ]
Trac 1.5.3 which comes with Ubuntu 20.04 crashes because of problems with a library. The problem was fixed upstream: https:/
Changed in trac (Ubuntu Jammy): | |
status: | New → In Progress |
assignee: | nobody → Sudip Mukherjee (sudipmuk) |
Changed in trac (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in trac (Ubuntu Jammy): | |
status: | In Progress → Confirmed |
assignee: | Sudip Mukherjee (sudipmuk) → nobody |
description: | updated |
Changed in trac (Ubuntu Jammy): | |
status: | Fix Committed → In Progress |
description: | updated |
Changed in trac (Ubuntu Jammy): | |
status: | Incomplete → Confirmed |
Status changed to 'Confirmed' because the bug affects multiple users.