Opened 7 years ago

Closed 6 years ago

#3818 closed defect (invalid)

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

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


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\", line 423, in _dispatch_request
File "C:\Python25\Lib\site-packages\trac\web\", line 197, in dispatch
  resp = chosen_handler.process_request(req)
File "C:\Python25\Lib\site-packages\trac\ticket\", line 170, in process_request
  return self._process_ticket_request(req)
File "C:\Python25\Lib\site-packages\trac\ticket\", line 434, in _process_ticket_request
  req.perm('ticket', id, version).require('TICKET_VIEW')
File "C:\Python25\Lib\site-packages\trac\", line 545, in require
  if not self._has_permission(action, resource):
File "C:\Python25\Lib\site-packages\trac\", line 537, in _has_permission
  check_permission(action, perm.username, resource, perm)
File "C:\Python25\Lib\site-packages\trac\", line 424, in check_permission
File "build\bdist.win32\egg\timingandestimationplugin\", line 22, in check_permissionFile "build\bdist.win32\egg\timingandestimationplugin\", line 34, in check_ticket_access

Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by bobbysmith007

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 6 years ago by bobbysmith007

  • Keywords waiting-for-feedback added

comment:3 Changed 6 years ago by bobbysmith007

  • Resolution set to invalid
  • Status changed from new to closed

Assuming that this works since I have had no feedback

Add Comment

Modify Ticket

as closed The owner will remain bobbysmith007.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.