Modify ↓
Opened 16 years ago
Closed 16 years ago
#7522 closed defect (fixed)
NameError: global name '_' is not defined when unable to get database connection from pool
Reported by: | Owned by: | osimons | |
---|---|---|---|
Priority: | normal | Milestone: | 0.11.2 |
Component: | general | Version: | 0.11.1 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
It looks like there is a missing import in the db pooling code:
2008-08-11 08:22:42,307 Trac[__init__] ERROR: global name '_' is not defined Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py", line 423, in _dispatch_request dispatcher.dispatch(req) File "/usr/local/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py", line 197, in dispatch resp = chosen_handler.process_request(req) File "/usr/local/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/ticket/web_ui.py", line 170, in process_request return self._process_ticket_request(req) File "/usr/local/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/ticket/web_ui.py", line 434, in _process_ticket_request req.perm('ticket', id, version).require('TICKET_VIEW') File "/usr/local/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/perm.py", line 545, in require if not self._has_permission(action, resource): File "/usr/local/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/perm.py", line 536, in _has_permission decision = PermissionSystem(self.env). \ File "/usr/local/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/perm.py", line 424, in check_permission perm) File "/usr/local/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/perm.py", line 281, in check_permission permissions = PermissionSystem(self.env). \ File "/usr/local/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/perm.py", line 357, in get_user_permissions for perm in self.store.get_user_permissions(username): File "/usr/local/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/perm.py", line 173, in get_user_permissions db = self.env.get_db_cnx() File "/usr/local/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/env.py", line 257, in get_db_cnx return DatabaseManager(self).get_connection() File "/usr/local/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/db/api.py", line 76, in get_connection return self._cnx_pool.get_cnx(self.timeout or None) File "/usr/local/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/db/pool.py", line 166, in get_cnx return _backend.get_cnx(self._connector, self._kwargs, timeout) File "/usr/local/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/db/pool.py", line 112, in get_cnx raise TimeoutError(_('Unable to get database ' NameError: global name '_' is not defined
Attachments (0)
Change History (4)
comment:1 by , 16 years ago
Milestone: | → 0.11.2 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:2 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:3 by , 16 years ago
Owner: | set to |
---|---|
Status: | reopened → new |
Note:
See TracTickets
for help on using tickets.
I discovered this as well some days ago, and have already fixed it in [7455] - unfortunately not spotted until after 0.11.1 release.
As I fixed it without a ticket, this ticket may serve well as a reminder for the bug fix againt the 0.11.2 milestone.