Ticket #8585 (closed defect: fixed)

Opened 2 years ago

Last modified 10 months ago

error: ResourceNotFound: priority none does not exist.

Reported by: falkb Assigned to: 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

Change History

03/09/11 08:42:10 changed by anonymous

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

02/01/12 07:36:52 changed 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.

02/01/12 08:14:21 changed 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.

06/20/12 07:37:42 changed by rjollos

  • status changed from new to assigned.

06/20/12 07:40:03 changed 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.

06/20/12 11:55:04 changed by falkb

Cool, fixed now! :-)

06/20/12 19:32:46 changed 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.

07/28/12 06:33:28 changed by rjollos

  • status changed from assigned to closed.
  • resolution set to fixed.

Add/Change #8585 (error: ResourceNotFound: priority none does not exist.)




Change Properties
Action