Modify

Opened 14 years ago

Closed 12 years ago

#8585 closed defect (fixed)

error: ResourceNotFound: priority none does not exist.

Reported by: falkb Owned by: Ryan J Ollos
Priority: normal Component: PollMacro
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

Don't know when it happens but after a while I see this in my logging:

2011-03-08 14:45:40,861 Trac[formatter] ERROR: Macro Poll(Which of these do you prefer?; #1; #2; #3; query:component=Request-a-Hack&status!=closed; Cheese dip) failed: 
Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 717, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 304, in process
    text = self.processor(text)
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 291, in _macro_processor
    text)
  File "build\bdist.win32\egg\tracpoll\tracpoll.py", line 129, in expand_macro
    return self.render_poll(req, title, content)
  File "build\bdist.win32\egg\tracpoll\tracpoll.py", line 162, in render_poll
    priority = Priority(self.env, ticket['priority']).value
  File "build\bdist.win32\egg\trac\ticket\model.py", line 664, in __init__
    type=self.type, name=name))
ResourceNotFound: priority none does not exist.

It's Trac 0.12.1 running here.

Attachments (0)

Change History (8)

comment:1 Changed 14 years ago by anonymous

and yes, I removed the standard priority values and set my own ones.

comment:2 Changed 13 years ago by Ryan J Ollos

I think the issue is that one or more of your tickets has a priority that is no longer an entry in your Priority list. I'm not sure how to deal with this yet.

comment:3 Changed 13 years ago by falkb

yes, once I tweaked the priorities, at least I renamed them and added a new one called "normal" between "minor" and "major". Maybe in the beginning there was also "none" but I can't remember anymore, I haven't got "none" in the list anyway.

Likely it's a good idea to fallback to default priority if an unknown priority has been found.

comment:4 Changed 12 years ago by Ryan J Ollos

Status: newassigned

comment:5 Changed 12 years ago by Ryan J Ollos

(In [11669]) Refs #8585:

  • ResourceNotFound error would result if a ticket in the poll had a priority name that had been removed from the model.
  • Added error checking for proper number of arguments.
  • Bumped version to 0.3.0dev.
  • Renamed 0.11 directory to trunk.

comment:6 Changed 12 years ago by falkb

Cool, fixed now! :-)

comment:7 Changed 12 years ago by Ryan J Ollos

Thanks for the feedback. I'll leave this ticket open for about a month, and then create a tag for version 0.3.

comment:8 Changed 12 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

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.