[Bug 2024325] [NEW] [SRU] trac crashes while importing a library in Ubuntu 20.04 (ImportError: cannot import name 'soft_unicode' from 'jinja2.utils')
Launchpad Bug Tracker
2024325 at bugs.launchpad.net
Mon Jan 29 22:12:15 UTC 2024
You have been subscribed to a public bug by Sudip Mukherjee (sudipmuk):
[ 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.exit(load_entry_point('Trac==1.5.3', 'console_scripts', 'tracd')())
File "/usr/bin/tracd", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/trac/web/standalone.py", line 35, in <module>
from trac.web.auth import BasicAuthentication, DigestAuthentication
File "/usr/lib/python3/dist-packages/trac/web/auth.py", line 29, in <module>
from trac.web.chrome import Chrome, INavigationContributor
File "/usr/lib/python3/dist-packages/trac/web/chrome.py", line 40, in <module>
from trac.mimeview.api import RenderingContext, get_mimetype
File "/usr/lib/python3/dist-packages/trac/mimeview/__init__.py", line 14, in <module>
from trac.mimeview.api import *
File "/usr/lib/python3/dist-packages/trac/mimeview/api.py", line 70, in <module>
from trac.resource import Resource
File "/usr/lib/python3/dist-packages/trac/resource.py", line 21, in <module>
from trac.util.presentation import classes
File "/usr/lib/python3/dist-packages/trac/util/presentation.py", line 26, in <module>
from jinja2.utils import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'jinja2.utils' (/usr/lib/python3/dist-packages/jinja2/utils.py)
[ 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: (execue the following as root)
- mkdir -p /var/lib/trac
- trac-admin /var/lib/trac/myproject initenv
- Enter some project name when prompted
- Leave default sqlite DB (just press enter)
- echo -n "tracadmin:example.com:" > /var/lib/trac/myproject/users.htdigest
- trac-admin /var/lib/trac/myproject permission add tracadmin TRAC_ADMIN
- tracd --port 8080 --auth=*,/var/lib/trac/myproject/users.htdigest,example.com /var/lib/trac/myproject
- open http://127.0.0.1:8080 in browser, it should show the project name and clicking on that should show the welcome screen
[ 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.
[ 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://trac.edgewall.org/ticket/13404
** Affects: trac (Ubuntu)
Importance: Undecided
Status: Fix Released
** Affects: trac (Ubuntu Jammy)
Importance: Undecided
Status: Confirmed
** Tags: jammy
--
[SRU] trac crashes while importing a library in Ubuntu 20.04 (ImportError: cannot import name 'soft_unicode' from 'jinja2.utils')
https://bugs.launchpad.net/bugs/2024325
You received this bug notification because you are a member of Ubuntu Sponsors, which is subscribed to the bug report.
More information about the Ubuntu-sponsors
mailing list