Modify

Opened 3 years ago

Closed 2 years ago

#8585 closed defect (fixed)

error: ResourceNotFound: priority none does not exist.

Reported by: falkb Owned by: rjollos
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 3 years ago by anonymous

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

comment:2 Changed 2 years ago by rjollos

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 2 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 2 years ago by rjollos

  • Status changed from new to assigned

comment:5 Changed 2 years ago by rjollos

(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 2 years ago by falkb

Cool, fixed now! :-)

comment:7 Changed 2 years ago by rjollos

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 2 years ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from rjollos. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.