Edgewall Software
Modify

Opened 12 years ago

Closed 12 years ago

#10721 closed defect (duplicate)

TracError messages are not displayed in browser

Reported by: Oleg Pudeyev <oleg@…> Owned by:
Priority: normal Milestone:
Component: general Version: 0.12.2
Severity: normal Keywords: TracError babel
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Tried this with fastcgi and tracd.

In browser I get:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/web/api.py", line 440, in send_error
    data, 'text/html')
  File "/usr/local/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/web/chrome.py", line 827, in render_template
    message = req.session.pop('chrome.%s.%d' % (type_, i))
  File "/usr/local/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/web/api.py", line 216, in __getattr__
    value = self.callbacks[name](self)
  File "/usr/local/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/web/main.py", line 300, in _get_session
    return Session(self.env, req)
  File "/usr/local/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/web/session.py", line 198, in __init__
    self.get_session(sid)
  File "/usr/local/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/web/session.py", line 219, in get_session
    super(Session, self).get_session(sid, authenticated)
  File "/usr/local/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/web/session.py", line 61, in get_session
    db = self.env.get_db_cnx()
  File "/usr/local/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/env.py", line 328, in get_db_cnx
    return get_read_db(self)
  File "/usr/local/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/db/api.py", line 90, in get_read_db
    return _transaction_local.db or DatabaseManager(env).get_connection()
  File "/usr/local/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/db/api.py", line 152, in get_connection
    return self._cnx_pool.get_cnx(self.timeout or None)
  File "/usr/local/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/db/pool.py", line 226, in get_cnx
    return _backend.get_cnx(self._connector, self._kwargs, timeout)
  File "/usr/local/lib/python2.7/site-packages/Trac-0.12.2-py2.7.egg/trac/db/pool.py", line 146, in get_cnx
    raise TimeoutError(errmsg)
TimeoutError: Unable to get database connection within 0 seconds. (TracError(<babel.support.LazyProxy object at 0x2987e5f4>,))

In trac-admin the TracError has the actual description displayed (in my case, incorrect permissions for db/sqlite.db - see #10720).

Attachments (0)

Change History (3)

comment:1 by Jun Omae, 12 years ago

This issue has been fixed in Trac 0.12.3, [10552] for #9916. The following is shown in browser.

Traceback (most recent call last):
  File "/home/jun66j5/src/trac/edgewall/github/trac/web/api.py", line 446, in send_error
    data, 'text/html')
...
  File "/home/jun66j5/src/trac/edgewall/github/trac/db/pool.py", line 154, in get_cnx
    raise TimeoutError(errmsg)
TimeoutError: Unable to get database connection within 0 seconds. (TracError: The user jun66j5 requires read _and_ write permissions to the database file /home/jun66j5/var/trac/0.12-stable/db/trac.db and the directory it is located in.)

BTW, we can improve logging the original exception with traceback if log is available. 5719d9d/jomae.git. Thoughts?

comment:2 by Christian Boos, 12 years ago

Yes, however on %r would read better than while %r operation ("Exception caught on close" for example)

comment:3 by Jun Omae, 12 years ago

Resolution: duplicate
Status: newclosed

Thanks you for the comments. Applied the change in [11062].

The original issue is a duplicate of #9916.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.