Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13080 closed defect (fixed)

Trac 1.3.2dev: AttributeError: 'Environment' object has no attribute 'get_read_db'

Reported by: lkraav Owned by: Russ Tyndall
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description (last modified by lkraav)

Crash on /billing handler.


File "/home/trac/src/trac.git/trac/web/", line 630, in _dispatch_request          
File "/home/trac/src/trac.git/trac/web/", line 252, in dispatch          
  resp = chosen_handler.process_request(req)
File "/home/trac/src/trac-hacks.git/timingandestimationplugin/branches/trac1.0/timingandestimationplugin/", line 130, in process_request          
  mgr = CustomReportManager(self.env, self.log)
File "/home/trac/src/trac-hacks.git/timingandestimationplugin/branches/trac1.0/timingandestimationplugin/", line 22, in __init__          
File "/home/trac/src/trac-hacks.git/timingandestimationplugin/branches/trac1.0/timingandestimationplugin/", line 27, in upgrade          
  version = tryint(dbhelper.get_system_value(self.env,
File "/home/trac/src/trac-hacks.git/timingandestimationplugin/branches/trac1.0/timingandestimationplugin/", line 127, in get_system_value          
  return get_scalar(env, "SELECT value FROM system WHERE name=%s", 0, key)
File "/home/trac/src/trac-hacks.git/timingandestimationplugin/branches/trac1.0/timingandestimationplugin/", line 48, in get_scalar          
  data = get_first_row(env, sql, *params);
File "/home/trac/src/trac-hacks.git/timingandestimationplugin/branches/trac1.0/timingandestimationplugin/", line 35, in get_first_row          
  db = env.get_read_db()

Change History (11)

comment:1 Changed 7 years ago by lkraav

Description: modified (diff)

Specify /billing handler

comment:2 Changed 7 years ago by Ryan J Ollos

See also #12853, which is required for Trac 1.1+ compatibility.

comment:3 Changed 7 years ago by Russ Tyndall

I have been quite busy this year as my company recently lost a valuable employee. I will try to get to this soon :)

comment:4 Changed 7 years ago by lkraav

v2 patch includes additional db api compatibility updates.

The changes aren't actually big, just mostly about with env.db_query as db: indentation.

Looking forward to having you back, Russ

Last edited 7 years ago by lkraav (previous) (diff)

comment:5 Changed 7 years ago by Ryan J Ollos

If you use db=None for environment_needs_upgrade and upgrade_environment, the patch should work for Trac 1.0 and 1.2.

comment:6 Changed 7 years ago by Russ Tyndall

In 16684:

Applying patches from trac-hacks to modernize interfacing with the database re #13080

comment:7 Changed 7 years ago by Russ Tyndall

Resolution: fixed
Status: newclosed

Sorry it took so long and much thank lkraav!

comment:8 Changed 7 years ago by Russ Tyndall

In 16688:

Porting changes from the non permission branch

  • Remove defunct, unused macros include in billing.html re #12853
  • Update database access for proper trac 1.1 Thanks lkraav re #13080
  • be more forgiving about what goes through convert float in ticket daemon re #13219
  • Change billing html a bit re #11280

Modify Ticket

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