Modify

Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#14092 closed defect (duplicate)

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

Reported by: masteradmin Owned by: ttressieres
Priority: normal Component: StractisticsPlugin
Severity: blocker Keywords:
Cc: Trac Release: 1.4

Description

How to Reproduce

While doing a GET operation on /stractistics, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'arguments': None, 'module': None}

User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36 Edg/96.0.1054.43

System Information

Trac 1.4.3
Babel 2.9.1
Genshi 0.7.5 (with speedups)
GIT 2.28.0
Jinja2 2.11.3
Pygments 2.5.2
pysqlite 2.6.0
Python 2.7.18 (default, Oct 29 2020, 17:28:54)
[GCC FreeBSD Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-
pytz 2021.1
setuptools 44.1.1
SQLite 3.33.0
jQuery 1.12.4
jQuery UI 1.12.1
jQuery Timepicker 1.6.3

Enabled Plugins

BlueFlatTheme 1.1.0.dev0
JQChart 1.0.dev0
KeepInterfaceSimple2Plugin 2.5
MultiProjectBacklog 0.5.0.dev0
StatusHistoryChart 0.2
STractistics 0.5.0b0
TimeTracking 1.3
Trac-jsGantt 1.2.0.0.dev0
TracAccountManager 0.5.0
TracChangeLog 0.5
TracDragDrop 0.12.0.15
TracGraphviz 1.4.0.1
TracHtmlNotificationPlugin 0.12.0.2
TracSimpleMultiProject 0.7.4
TracStats 0.6.1
TracSubTickets 0.5.4
TracTags 0.12.1
TracThemeEngine 2.3.1
TracVote 0.7.0

Interface Customization

shared-htdocs
shared-templates
site-htdocs theme.css
site-templates

Python Traceback

Traceback (most recent call last):
  File "/vp27/lib/python2.7/site-packages/trac/web/main.py", line 639, in dispatch_request
    dispatcher.dispatch(req)
  File "/vp27/lib/python2.7/site-packages/trac/web/main.py", line 250, in dispatch
    resp = chosen_handler.process_request(req)
  File "/vp27/lib/python2.7/site-packages/stractistics/web_ui.py", line 110, in process_request
    db = self.env.get_db_cnx()
AttributeError: 'Environment' object has no attribute 'get_db_cnx'

Attachments (0)

Change History (6)

comment:1 Changed 5 months ago by Ryan J Ollos

It's not compatible with Trac 1.2+. Code needs to be migrated.

comment:2 Changed 5 months ago by Jun Omae

Priority: highnormal
Resolution: duplicate
Status: newclosed

That is a duplicate of #13563. The issue has been fixed. Try to upgrade to the latest version.

comment:3 Changed 5 months ago by Ryan J Ollos

You are right, thanks. I just looked at the tags on the project page, which hadn't been properly updated to list 1.2.

comment:4 Changed 5 months ago by anonymous

That is a duplicate of #13563. The issue has been fixed. Try to upgrade to the latest version.

I installed the latest version and this problem exist.

comment:5 Changed 5 months ago by Jun Omae

No get_db_cnx is used in the latest version. The same error shouldn't be raised. Your upgrade steps have something wrong.

$ svn co https://trac-hacks.org/svn/stractisticsplugin/trunk stractisticsplugin
$ grep -wrc --include='*.py' get_db_cnx stractisticsplugin
stractisticsplugin/setup.py:0
stractisticsplugin/stractistics/util.py:0
stractisticsplugin/stractistics/__init__.py:0
stractisticsplugin/stractistics/user_reports.py:0
stractisticsplugin/stractistics/OpenFlashChart.py:0
stractisticsplugin/stractistics/global_reports.py:0
stractisticsplugin/stractistics/web_ui.py:0

Please ask on the wiki:MailingList for support questions.

comment:6 Changed 5 months ago by Jun Omae

If you encounter other issues, please post the detail.

Modify Ticket

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