Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#13413 closed defect (duplicate)

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

Reported by: Rakesh Kumar Owned by: Ryan J Ollos
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: #USER_AGENT#

System Information

Trac 1.2.2
Babel 1.3
Genshi 0.7 (without speedups)
Pygments 2.1.3
pysqlite 2.4.1
Python 2.6.6 (r266:84292, Aug 9 2016, 06:11:56)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
pytz 2010h
setuptools 18.2
SQLite 3.6.20
Subversion 1.6.11 (r934486)
jQuery #JQUERY#
jQuery UI #JQUERYUI#
jQuery Timepicker #JQUERYTP#

Enabled Plugins

AdvancedTicketWorkflowPlugin 1.2.0dev-r0
ComponentDependencyPlugin 0.1
timingandestimationplugin 1.4.8b0
TracAccountManager 0.4.4
TracAutocompleteUsersPlugin 0.4.3dev-r0
TracCustomFieldAdmin 0.2.12
TracWorkflowAdmin 0.12.0.2

Interface Customization

shared-htdocs
shared-templates
site-htdocs ICMSLOGO.gif, icms2.png, icms_trac.png, tracworkflowadmin
site-templates

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 623, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 239, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-x86_64/egg/trac/admin/web_ui.py", line 109, in process_request
    provider.render_admin_panel(req, cat_id, panel_id, path_info)
  File "build/bdist.linux-x86_64/egg/acct_mgr/admin.py", line 204, in render_admin_panel
    return self._do_users(req)
  File "build/bdist.linux-x86_64/egg/acct_mgr/admin.py", line 449, in _do_users
    data['accounts'] = fetch_user_data(env, req)
  File "build/bdist.linux-x86_64/egg/acct_mgr/admin.py", line 73, in fetch_user_data
    authenticated=None).iteritems():
  File "build/bdist.linux-x86_64/egg/acct_mgr/model.py", line 123, in get_user_attribute
    db = _get_db(env, db)
  File "build/bdist.linux-x86_64/egg/acct_mgr/model.py", line 292, in _get_db
    return db or env.get_db_cnx()
AttributeError: 'Environment' object has no attribute 'get_db_cnx'

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by Jun Omae

Resolution: duplicate
Status: newclosed

Duplicate:

#11915
Environment.get_db_cnx is deprecated
#12017
AttributeError: 'Environment' object has no attribute 'get_db_cnx'
#12531
AttributeError: 'Environment' object has no attribute 'get_db_cnx'
#12598
AttributeError: 'Environment' object has no attribute 'get_db_cnx'
#13249
AttributeError: 'Environment' object has no attribute 'get_db_cnx'
#13250
AttributeError: 'Environment' object has no attribute 'get_db_cnx'
#13320
AttributeError: 'Environment' object has no attribute 'get_db_cnx'
#13413
AttributeError: 'Environment' object has no attribute 'get_db_cnx'

See AccountManagerPlugin#DownloadsandSource.

Version 0, edited 6 years ago by Jun Omae (next)

comment:2 Changed 6 years ago by Jun Omae

Reporter: changed from 5208 to Rakesh Kumar

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.