Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#4341 closed defect (fixed)

Could not render BurndownChart

Reported by: stanly.lau@… Owned by: hoessler
Priority: normal Component: EstimationToolsPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.11


Hi, I had installed EstimationToolsPlugin from and XmlRpcPlugin from on my Trac 11.2.1. However when I tried to insert the sample macro indicated in the website

BurndownChart(milestone=Sprint 1, startdate=2008-01-01)?

I had the following error:

Error: Macro BurndownChart(milestone=Product Backlog, startdate=2008-01-01) failed
unrecognized token: "#"

I had created a milestone 'Sprint 1' with some tickets tagged to it. All the plugins installed are enabled. May I know what could be the problem?

Thank you,

Attachments (0)

Change History (5)

comment:1 Changed 6 years ago by stanly.lau@…

Forgot to code block the macro in the description. Here it is:

[[BurndownChart(milestone=Sprint 1, startdate=2008-01-01)]]

comment:2 Changed 6 years ago by hoessler

Hm, I've never seen that error message. Could you enable logging and check if that provides some more information on what goes wrong?

comment:3 Changed 6 years ago by stanly.lau@…

Hi, here's the debug logging turned on.

2009-01-27 15:03:17,023 Trac[formatter] DEBUG: Executing Wiki macro BurndownChart by provider <estimationtools.burndownchart.BurndownChart object at 0x019BC950>
2009-01-27 15:03:17,023 Trac[macros] WARNING: Executing pre-0.11 Wiki macro BurndownChart by provider <class 'estimationtools.burndownchart.BurndownChart'>
2009-01-27 15:03:17,039 Trac[formatter] ERROR: Macro BurndownChart(milestone=Backlog, startdate=2009-01-22) failed
Traceback (most recent call last):
  File "c:\python25\lib\site-packages\Trac-\trac\wiki\", line 470, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "c:\python25\lib\site-packages\Trac-\trac\wiki\", line 180, in process
    text = self.processor(text)
  File "c:\python25\lib\site-packages\Trac-\trac\wiki\", line 167, in _macro_processor
  File "c:\python25\lib\site-packages\Trac-\trac\wiki\", line 66, in expand_macro
    return self.render_macro(formatter.req, name, content)
  File "build\bdist.win32\egg\estimationtools\", line 55, in render_macro
    timetable = self._calculate_timetable(options, query_args, req)
  File "build\bdist.win32\egg\estimationtools\", line 121, in _calculate_timetable
    tickets = execute_query(self.env, req, query_args)
  File "build\bdist.win32\egg\estimationtools\", line 77, in execute_query
    tickets = query.execute(req)
  File "c:\python25\lib\site-packages\Trac-\trac\ticket\", line 261, in execute
    self.num_items = self._count(sql, args, db)
  File "c:\python25\lib\site-packages\Trac-\trac\ticket\", line 246, in _count
    cursor.execute(count_sql, args);
  File "c:\python25\lib\site-packages\Trac-\trac\db\", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "c:\python25\lib\site-packages\Trac-\trac\db\", line 58, in execute
    args or [])
  File "c:\python25\lib\site-packages\Trac-\trac\db\", line 50, in _rollback_on_error
    return function(self, *args, **kwargs)
OperationalError: unrecognized token: "#"

comment:4 Changed 6 years ago by hoessler

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

Doh, I think I found the bug: it's not a bug in the plugin, but in its documentation. In the trac.ini file you are not allowed to !add comments at the end of a line, they have to be on a new line instead. So in your trac.ini, I guess you have

estimation_field = estimatedhours   # if you want to use another field than estimatedhours 

but it should be

# if you want to use another field than estimatedhours
estimation_field = estimatedhours    

I fixed that in the installation docs on the wiki page.

comment:5 Changed 6 years ago by stanly.lau@…

Million thanks for this plugin! Its totally cool!

Add Comment

Modify Ticket

as closed .
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.