Modify

Opened 10 years ago

Closed 10 years ago

#12017 closed defect (duplicate)

AttributeError: 'Environment' object has no attribute 'get_db_cnx'

Reported by: admin Owned by: Steffen Hoffmann
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

How to Reproduce

While doing a GET operation on /admin/accounts/users, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'cat_id': u'accounts', 'panel_id': u'users', 'path_info': None}

User agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0

System Information

Trac 1.1.2beta1
Genshi 0.7 (with speedups)
Pygments 1.6
pysqlite 2.6.0
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2]
pytz 2012c
setuptools 3.3
SQLite 3.8.2
Subversion 1.8.8 (r1568071)
jQuery 1.8.3
jQuery UI 1.9.2
jQuery Timepicker 1.1.1

Enabled Plugins

TracAccountManager 0.5dev-r14078

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 550, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 224, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/trac/admin/web_ui.py", line 119, in process_request
    path_info)
  File "build/bdist.linux-x86_64/egg/acct_mgr/admin.py", line 231, in render_admin_panel
    return self._do_users(req)
  File "build/bdist.linux-x86_64/egg/acct_mgr/admin.py", line 983, in _do_users
    filters)))
  File "build/bdist.linux-x86_64/egg/acct_mgr/admin.py", line 69, in fetch_user_data
    authenticated=None).iteritems():
  File "build/bdist.linux-x86_64/egg/acct_mgr/model.py", line 494, in get_user_attribute
    db = _get_db(env, db)
  File "build/bdist.linux-x86_64/egg/acct_mgr/model.py", line 661, in _get_db
    return db or env.get_db_cnx()
AttributeError: 'Environment' object has no attribute 'get_db_cnx'

Attachments (0)

Change History (1)

comment:1 Changed 10 years ago by Steffen Hoffmann

Resolution: duplicate
Status: newclosed

This is much lesser informative, but essentially the same as #11915.

I'm currently working on this major upstream compatibility issue, and there is probably not much more to do than look and use Jun's valuable contribution, if you insist on a solution right now.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.