Modify

Opened 16 years ago

Closed 15 years ago

#3818 closed defect (invalid)

AttributeError: 'Ticket' object has no attribute 'get_value_or_default'

Reported by: anonymous Owned by: Russ Tyndall
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords: waiting-for-feedback
Cc: aleksdj@… Trac Release: 0.11

Description

With "timeandestimating with permissions" plugin there is an error each time I try to access to one ticket or list the timeline:

AttributeError: 'Ticket' object has no attribute 'get_value_or_default'

This is the python traceback:

Python Traceback

Most recent call last:
File "C:\Python25\Lib\site-packages\trac\web\main.py", line 423, in _dispatch_request
  dispatcher.dispatch(req)
File "C:\Python25\Lib\site-packages\trac\web\main.py", line 197, in dispatch
  resp = chosen_handler.process_request(req)
File "C:\Python25\Lib\site-packages\trac\ticket\web_ui.py", line 170, in process_request
  return self._process_ticket_request(req)
File "C:\Python25\Lib\site-packages\trac\ticket\web_ui.py", line 434, in _process_ticket_request
  req.perm('ticket', id, version).require('TICKET_VIEW')
File "C:\Python25\Lib\site-packages\trac\perm.py", line 545, in require
  if not self._has_permission(action, resource):
File "C:\Python25\Lib\site-packages\trac\perm.py", line 537, in _has_permission
  check_permission(action, perm.username, resource, perm)
File "C:\Python25\Lib\site-packages\trac\perm.py", line 424, in check_permission
  perm)
File "build\bdist.win32\egg\timingandestimationplugin\ticket_policy.py", line 22, in check_permissionFile "build\bdist.win32\egg\timingandestimationplugin\ticket_policy.py", line 34, in check_ticket_access

Attachments (0)

Change History (3)

comment:1 Changed 16 years ago by Russ Tyndall

Which version of trac are you using? In my trac '0.11stable-r7510' I have the 'get_value_or_default' function available.

If you have IPython installed you might try running the following commands to find out the version number and which functions are available on your version of ticket.

import trac
from trac.env import Environment
from trac.ticket import Ticket

trac.__version__ # this will tell you the version number

e = Environment('/path/to/trac/dir')
t = Ticket(e, 1)

dir(t) # should tell you which items are available

comment:2 Changed 15 years ago by Russ Tyndall

Keywords: waiting-for-feedback added

comment:3 Changed 15 years ago by Russ Tyndall

Resolution: invalid
Status: newclosed

Assuming that this works since I have had no feedback

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.