Modify

Opened 6 years ago

Closed 5 years ago

Last modified 5 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

Description

Hi, I had installed EstimationToolsPlugin from http://trac-hacks.org/svn/estimationtoolsplugin and XmlRpcPlugin from http://trac-hacks.org/svn/xmlrpcplugin/trunk 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,
Stanly

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 5 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 5 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-0.11.2.1-py2.5-win32.egg\trac\wiki\formatter.py", line 470, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "c:\python25\lib\site-packages\Trac-0.11.2.1-py2.5-win32.egg\trac\wiki\formatter.py", line 180, in process
    text = self.processor(text)
  File "c:\python25\lib\site-packages\Trac-0.11.2.1-py2.5-win32.egg\trac\wiki\formatter.py", line 167, in _macro_processor
    text)
  File "c:\python25\lib\site-packages\Trac-0.11.2.1-py2.5-win32.egg\trac\wiki\macros.py", line 66, in expand_macro
    return self.render_macro(formatter.req, name, content)
  File "build\bdist.win32\egg\estimationtools\burndownchart.py", line 55, in render_macro
    timetable = self._calculate_timetable(options, query_args, req)
  File "build\bdist.win32\egg\estimationtools\burndownchart.py", line 121, in _calculate_timetable
    tickets = execute_query(self.env, req, query_args)
  File "build\bdist.win32\egg\estimationtools\utils.py", line 77, in execute_query
    tickets = query.execute(req)
  File "c:\python25\lib\site-packages\Trac-0.11.2.1-py2.5-win32.egg\trac\ticket\query.py", line 261, in execute
    self.num_items = self._count(sql, args, db)
  File "c:\python25\lib\site-packages\Trac-0.11.2.1-py2.5-win32.egg\trac\ticket\query.py", line 246, in _count
    cursor.execute(count_sql, args);
  File "c:\python25\lib\site-packages\Trac-0.11.2.1-py2.5-win32.egg\trac\db\util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "c:\python25\lib\site-packages\Trac-0.11.2.1-py2.5-win32.egg\trac\db\sqlite_backend.py", line 58, in execute
    args or [])
  File "c:\python25\lib\site-packages\Trac-0.11.2.1-py2.5-win32.egg\trac\db\sqlite_backend.py", line 50, in _rollback_on_error
    return function(self, *args, **kwargs)
OperationalError: unrecognized token: "#"

comment:4 Changed 5 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-tools] 
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 5 years ago by stanly.lau@…

Million thanks for this plugin! Its totally cool!

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 hoessler. 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.