On Sun, Mar 24, 2024 at 21:35 Clemens Feige <c.fe...@osypkamed.com
<mailto:c.fe...@osypkamed.com>> wrote:
Hello
Summary:
The CcSelectorPlugin produces an error message if Babel is not
installed.
https://trac-hacks.org/wiki/CcSelectorPlugin
<https://trac-hacks.org/wiki/CcSelectorPlugin>
Background:
I have been using the CcSelectorPlugin for many years. Now I
re-installed my TRAC server (now with TRAC 1.6). Intentionally I decided
to install TRAC without Babel because we do not want multi-lingual
support.
After installing CcSelectorPlugin (Version 0.3, TrackHacks Revision
18597, from Nov. 2023, installation via PIP) it presents the following
error when I click the "CC Selection" button:
Trac detected an internal error:
KeyError: 'dgettext'
The Python Traceback points to "site-packages/trac/util/translation.py".
Of course the solution is to install Babel, which will solve the
problem.
Nevertheless IMHO either a plug-in should clearly state its dependencies
during installation (or during run-time or in the documentation). Best
of course would be, if the plug-in could run without Babel.
After all, Babel is just optional for TRAC.
Don't get me wrong. I do not complain or blame. I just want to avoid
that people remove this nice plug-in just because they are facing a
"mysterious" error and do not see the simply solution to install Babel.
Unfortunately I know only little about Python and nothing about Babel
and thus cannot offer a patch. Shall I file a bug report?
Best regards
Clemens
Jun Omae wrote on 24.03.2024 at 13:46:
Could you please post entire of the traceback?
Here is the traceback.
Python Traceback
File "/data/trac/python/lib/python3.11/site-packages/trac/web/main.py",
line 609, in dispatch_request dispatcher.dispatch(req)
File "/data/trac/python/lib/python3.11/site-packages/trac/web/main.py",
line 301, in dispatch raise e
File "/data/trac/python/lib/python3.11/site-packages/trac/web/main.py",
line 265, in dispatch output = chrome.render_template(req, template,
data, metadata)
File
"/data/trac/python/lib/python3.11/site-packages/trac/web/chrome.py",
line 1381, in render_template template, data =
self.prepare_template(req, filename, data, text,
File
"/data/trac/python/lib/python3.11/site-packages/trac/web/chrome.py",
line 1487, in prepare_template domain_functions =
translation.domain_functions(domain, symbols)
File
"/data/trac/python/lib/python3.11/site-packages/trac/util/translation.py",
line 92, in domain_functions return [_functions[s] for s in symbols]
File
"/data/trac/python/lib/python3.11/site-packages/trac/util/translation.py",
line 92, in <listcomp> return [_functions[s] for s in symbols]
One can also "simulate" the issue by temporarily renaming the babel
installation directory. See attached screen shot.
Clemens
--
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/trac-users/ec1b02bf-7ce9-4639-b0b2-dba7386d508b%40osypkamed.com.